Remove deprecated slice diffing methods
This commit is contained in:
parent
25aba69438
commit
e3c6e5498a
4 changed files with 4 additions and 39 deletions
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
All notable changes to similar are documented here.
|
All notable changes to similar are documented here.
|
||||||
|
|
||||||
|
## 2.1.0
|
||||||
|
|
||||||
|
* Removed deprecated alternative slice diffing functions.
|
||||||
|
|
||||||
## 2.0.0
|
## 2.0.0
|
||||||
|
|
||||||
* Change the `Change` type and associated methods to work on any `T: Clone` instead
|
* Change the `Change` type and associated methods to work on any `T: Clone` instead
|
||||||
|
|
|
||||||
|
|
@ -134,19 +134,6 @@ where
|
||||||
d.finish()
|
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, T>(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, New>(
|
fn make_table<Old, New>(
|
||||||
old: &Old,
|
old: &Old,
|
||||||
old_range: Range<usize>,
|
old_range: Range<usize>,
|
||||||
|
|
|
||||||
|
|
@ -73,19 +73,6 @@ where
|
||||||
d.finish()
|
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, T>(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
|
// 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
|
// 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.
|
// and then a possibly empty sequence of diagonal edges called a snake.
|
||||||
|
|
|
||||||
|
|
@ -83,19 +83,6 @@ where
|
||||||
Ok(())
|
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, T>(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> {
|
struct Patience<'old, 'new, 'd, Old: ?Sized, New: ?Sized, D> {
|
||||||
d: &'d mut D,
|
d: &'d mut D,
|
||||||
old: &'old Old,
|
old: &'old Old,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue