diff --git a/Cargo.lock b/Cargo.lock index 9e1c50e..6dbcff4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -67,6 +67,16 @@ version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" +[[package]] +name = "bstr" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bb31b46c14244e20ee9984b11bf5c992b91fb6939fea616e3512c8baecdbe5f" +dependencies = [ + "memchr", + "serde_core", +] + [[package]] name = "cfg-if" version = "1.0.4" @@ -707,9 +717,12 @@ dependencies = [ [[package]] name = "similar" -version = "2.7.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daa" +checksum = "4f66ca1f7aca2474dc10c942eb22feffc897735f54cd1db90138c2fddb490987" +dependencies = [ + "bstr", +] [[package]] name = "smallvec" diff --git a/Cargo.toml b/Cargo.toml index 70cdf8e..c41e981 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ clap = { version = "4.5.51", features = ["derive"] } console = "0.16.1" pulldown-cmark = { version = "0.13.0", default-features = false, features = ["simd"] } ropey = "1.6.1" -similar = "2.7.0" +similar = "3.2.0" snafu = { version = "0.9.2", default-features = false, features = ["std"] } termimad = "0.34.0" walkdir = "2.5.0" diff --git a/src/diff.rs b/src/diff.rs index 203a6be..2f3ce8a 100644 --- a/src/diff.rs +++ b/src/diff.rs @@ -34,8 +34,8 @@ impl Diff { /// function. pub fn print(&self, content: &Rope) { for change in TextDiff::from_lines( - &content.to_string(), - &content.simulate(self.clone()).to_string(), + content.to_string(), + content.simulate(self.clone()).to_string(), ) .iter_all_changes() {