mirror of
https://github.com/loro-dev/loro.git
synced 2024-11-28 17:41:49 +00:00
chore: cargo fix
This commit is contained in:
parent
6a2da8a01f
commit
9770fb50f3
7 changed files with 14 additions and 15 deletions
|
@ -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::{
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue