From e3c6e5498aa26b356422f953b64f1bc0e56cc3cf Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sat, 11 Sep 2021 17:42:46 +0200 Subject: [PATCH] Remove deprecated slice diffing methods --- CHANGELOG.md | 4 ++++ src/algorithms/lcs.rs | 13 ------------- src/algorithms/myers.rs | 13 ------------- src/algorithms/patience.rs | 13 ------------- 4 files changed, 4 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94f2f32..ed6f6c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to similar are documented here. +## 2.1.0 + +* Removed deprecated alternative slice diffing functions. + ## 2.0.0 * Change the `Change` type and associated methods to work on any `T: Clone` instead diff --git a/src/algorithms/lcs.rs b/src/algorithms/lcs.rs index bc6ad6f..6d1af68 100644 --- a/src/algorithms/lcs.rs +++ b/src/algorithms/lcs.rs @@ -134,19 +134,6 @@ where d.finish() } -/// Shortcut for diffing slices. -#[deprecated( - since = "1.4.0", - note = "slice utility function is now only available via similar::algorithms::diff_slices" -)] -pub fn diff_slices(d: &mut D, old: &[T], new: &[T]) -> Result<(), D::Error> -where - D: DiffHook, - T: PartialEq, -{ - diff(d, old, 0..old.len(), new, 0..new.len()) -} - fn make_table( old: &Old, old_range: Range, diff --git a/src/algorithms/myers.rs b/src/algorithms/myers.rs index 1f097d3..542c7ed 100644 --- a/src/algorithms/myers.rs +++ b/src/algorithms/myers.rs @@ -73,19 +73,6 @@ where d.finish() } -/// Shortcut for diffing slices. -#[deprecated( - since = "1.4.0", - note = "slice utility function is now only available via similar::algorithms::diff_slices" -)] -pub fn diff_slices(d: &mut D, old: &[T], new: &[T]) -> Result<(), D::Error> -where - D: DiffHook, - T: PartialEq, -{ - diff(d, old, 0..old.len(), new, 0..new.len()) -} - // A D-path is a path which starts at (0,0) that has exactly D non-diagonal // edges. All D-paths consist of a (D - 1)-path followed by a non-diagonal edge // and then a possibly empty sequence of diagonal edges called a snake. diff --git a/src/algorithms/patience.rs b/src/algorithms/patience.rs index 3ab0f0e..2b2faa2 100644 --- a/src/algorithms/patience.rs +++ b/src/algorithms/patience.rs @@ -83,19 +83,6 @@ where Ok(()) } -/// Shortcut for diffing slices. -#[deprecated( - since = "1.4.0", - note = "slice utility function is now only available via similar::algorithms::diff_slices" -)] -pub fn diff_slices(d: &mut D, old: &[T], new: &[T]) -> Result<(), D::Error> -where - D: DiffHook, - T: Eq + Hash, -{ - diff(d, old, 0..old.len(), new, 0..new.len()) -} - struct Patience<'old, 'new, 'd, Old: ?Sized, New: ?Sized, D> { d: &'d mut D, old: &'old Old,