From 58e5286a1f1cb72bb3cfd1f1f6f415a4b80bdef2 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 22 Jul 2020 01:26:48 +0200 Subject: Try modifying diff hunk with 'unidiff' Testing out 'unidiff' to build the patch. Trying to see if it will adjust the line numbers automatically when the patch is modified. Doesn't look like it. Seems like it has a nice interface, though. Still having trouble applying the patch due to complaints of patch format errors. --- Cargo.lock | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'Cargo.lock') diff --git a/Cargo.lock b/Cargo.lock index ce31c89..bb425da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -160,6 +160,15 @@ version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" +[[package]] +name = "encoding_rs" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8ac63f94732332f44fe654443c46f6375d1939684c17b0afb6cb56b0456e171" +dependencies = [ + "cfg-if", +] + [[package]] name = "error-chain" version = "0.12.2" @@ -223,6 +232,7 @@ dependencies = [ "serde", "serde_json", "thiserror", + "unidiff", ] [[package]] @@ -1017,6 +1027,17 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" +[[package]] +name = "unidiff" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a62719acf1933bfdbeb73a657ecd9ecece70b405125267dd549e2e2edc232c" +dependencies = [ + "encoding_rs", + "lazy_static", + "regex", +] + [[package]] name = "untrusted" version = "0.6.2" -- cgit v1.2.3