Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove diff feature #30

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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