phenotype-patch 0.1.0

Unified diff and patch
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented1 out of 1 items with examples
  • Size
  • Source code size: 4.45 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 22s Average build duration of successful builds.
  • all releases: 22s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • KooshaPari

patch

Unified diff and patch library for Rust. Parse, create, and apply patches.

Features

  • Parse: Unified, context, and side-by-side diffs
  • Create: Generate diffs from text or structured data
  • Apply: Apply patches with conflict detection
  • Merge: Three-way merge with conflict markers

Installation

[dependencies]
patch = { git = "https://github.com/KooshaPari/patch" }

Usage

use patch::{diff, apply};

let old = "hello world";
let new = "hello rust";

let diff = diff(old, new)?;
apply(old, &diff)?;

License

MIT