chore: cargo fix

This commit is contained in:
Zixuan Chen 2022-10-26 18:40:08 +08:00
parent 6a2da8a01f
commit 9770fb50f3
7 changed files with 14 additions and 15 deletions

View file

@ -9,7 +9,7 @@ use enum_as_inner::EnumAsInner;
use rle::{
range_map::RangeMap,
rle_tree::{node::LeafNode, Position, SafeCursor, SafeCursorMut, UnsafeCursor},
HasLength, Mergable, RleVec, RleVecWithIndex, RleVecWithLen, Sliceable, ZeroElement,
HasLength, Mergable, RleVecWithLen, Sliceable, ZeroElement,
};
use crate::{

View file

@ -2,7 +2,6 @@ use rle::HasLength;
use crate::{
container::text::text_content::ListSlice,
debug_log,
id::{Counter, ID},
span::{CounterSpan, HasId, HasIdSpan, IdSpan},
version::IdSpanVector,

View file

@ -14,7 +14,7 @@ use std::{
use colored::Colorize;
use fxhash::{FxHashMap, FxHashSet};
use rle::{rle_tree::node::Node, HasLength, Sliceable};
use rle::{HasLength, Sliceable};
use smallvec::SmallVec;
mod iter;
mod mermaid;

View file

@ -2,9 +2,9 @@ use crate::{
change::{Lamport, Timestamp},
container::ContainerID,
id::{Counter, ID},
span::{HasId, IdSpan},
span::{HasId},
};
use rle::{HasIndex, HasLength, Mergable, RleVecWithIndex, Sliceable};
use rle::{HasIndex, HasLength, Mergable, Sliceable};
mod insert_content;
mod op_content;

View file

@ -40,10 +40,10 @@ impl Clone for OpContent {
content: content.clone(),
},
OpContent::Undo { target } => OpContent::Undo {
target: target.clone(),
target: *target,
},
OpContent::Redo { target } => OpContent::Redo {
target: target.clone(),
target: *target,
},
}
}

View file

@ -1,7 +1,7 @@
use std::ops::Range;
use crate::{rle_trait::GlobalIndex, HasIndex, HasLength, Mergable, Sliceable};
use num::{cast, Integer, Num, NumCast};
use num::{cast, Integer, NumCast};
use smallvec::{Array, SmallVec};
impl Sliceable for bool {

View file

@ -617,7 +617,7 @@ impl<'bump, T: Rle, A: RleTreeTrait<T>> LeafNode<'bump, T, A> {
notify(&b, next_leaf);
next_leaf.children.insert(
child_index - self.children.len() + 2,
(BumpBox::new_in(b, self.bump)),
BumpBox::new_in(b, self.bump),
);
}
@ -626,9 +626,9 @@ impl<'bump, T: Rle, A: RleTreeTrait<T>> LeafNode<'bump, T, A> {
notify(&b, self);
notify(&value, self);
self.children
.insert(child_index + 1, (BumpBox::new_in(b, self.bump)));
.insert(child_index + 1, BumpBox::new_in(b, self.bump));
self.children
.insert(child_index + 1, (BumpBox::new_in(value, self.bump)));
.insert(child_index + 1, BumpBox::new_in(value, self.bump));
Ok(())
}
@ -693,7 +693,7 @@ impl<'a, T: Rle, A: RleTreeTrait<T>> LeafNode<'a, T, A> {
end.slice(del_relative_to, end.atom_len()),
);
*end = (BumpBox::new_in(left, self.bump));
*end = BumpBox::new_in(left, self.bump);
result = self._insert_with_split(del_end + 1, right, notify);
handled = true;
}
@ -740,13 +740,13 @@ impl<'a, T: Rle, A: RleTreeTrait<T>> LeafNode<'a, T, A> {
if index <= self.children.len() {
notify(&value, self);
self.children
.insert(index, (BumpBox::new_in(value, self.bump)));
.insert(index, BumpBox::new_in(value, self.bump));
} else {
let leaf = ans.as_leaf_mut().unwrap();
notify(&value, leaf);
leaf.children.insert(
index - self.children.len(),
(BumpBox::new_in(value, self.bump)),
BumpBox::new_in(value, self.bump),
);
}
@ -754,7 +754,7 @@ impl<'a, T: Rle, A: RleTreeTrait<T>> LeafNode<'a, T, A> {
} else {
notify(&value, self);
self.children
.insert(index, (BumpBox::new_in(value, self.bump)));
.insert(index, BumpBox::new_in(value, self.bump));
Ok(())
}
}