Skip to content

Commit

Permalink
Remove diff feature (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsproul authored Oct 26, 2023
1 parent 40a5364 commit 6c82029
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 514 deletions.
217 changes: 0 additions & 217 deletions src/diff.rs

This file was deleted.

5 changes: 0 additions & 5 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@ pub enum Error {
PushNotSupported,
UpdateLeafError,
UpdateLeavesError,
InvalidDiffDeleteNotSupported,
InvalidDiffLeaf,
InvalidDiffNode,
InvalidDiffPendingUpdates,
InvalidRebaseNode,
InvalidRebaseLeaf,
AddToDiffError,
BuilderExpectedLeaf,
BuilderStackEmptyMerge,
BuilderStackEmptyMergeLeft,
Expand Down
2 changes: 0 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

pub mod builder;
pub mod cow;
pub mod diff;
pub mod error;
pub mod interface;
pub mod interface_iter;
Expand All @@ -20,7 +19,6 @@ pub mod utils;
pub mod vector;

pub use cow::Cow;
pub use diff::{CloneDiff, Diff, ListDiff, ResetListDiff, VectorDiff};
pub use error::Error;
pub use interface::ImmList;
pub use leaf::Leaf;
Expand Down
12 changes: 0 additions & 12 deletions src/list.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use crate::builder::Builder;
use crate::diff::{Diff, ListDiff};
use crate::interface::{ImmList, Interface, MutList};
use crate::interface_iter::{InterfaceIter, InterfaceIterCow};
use crate::iter::Iter;
Expand Down Expand Up @@ -264,17 +263,6 @@ impl<T: Value, N: Unsigned, U: UpdateMap<T>> List<T, N, U> {
}
Ok(())
}

pub fn rebase_via_diff(&self, base: &Self) -> Result<Self, Error> {
// Diff self from base.
let diff = ListDiff::compute_diff(base, self)?;

// Apply diff to base, yielding a new list rooted in base.
let mut new = base.clone();
diff.apply_diff(&mut new)?;

Ok(new)
}
}

impl<T: Value, N: Unsigned> Default for List<T, N> {
Expand Down
98 changes: 0 additions & 98 deletions src/tests/diff.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/tests/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#![cfg(test)]

mod builder;
mod diff;
mod iterator;
mod packed;
mod proptest;
Expand Down
Loading

0 comments on commit 6c82029

Please sign in to comment.