diff --git a/crates/loro-core/src/container/map/map_container.rs b/crates/loro-core/src/container/map/map_container.rs index d0068820..935ac419 100644 --- a/crates/loro-core/src/container/map/map_container.rs +++ b/crates/loro-core/src/container/map/map_container.rs @@ -1,4 +1,4 @@ -use std::sync::Arc; + use fxhash::FxHashMap; diff --git a/crates/loro-core/src/container/text/text_container.rs b/crates/loro-core/src/container/text/text_container.rs index fab2bba0..5fc4eee6 100644 --- a/crates/loro-core/src/container/text/text_container.rs +++ b/crates/loro-core/src/container/text/text_container.rs @@ -85,7 +85,7 @@ impl Container for TextContainer { } fn apply(&mut self, op: &OpProxy) { - let content = op.content_sliced(); + let _content = op.content_sliced(); todo!() } diff --git a/crates/loro-core/src/dag/test.rs b/crates/loro-core/src/dag/test.rs index 58a4b12e..bb1421bc 100644 --- a/crates/loro-core/src/dag/test.rs +++ b/crates/loro-core/src/dag/test.rs @@ -200,7 +200,7 @@ impl TestDag { } update_frontier(&mut self.frontier, node.id_last(), &node.deps); let contains_start = self.contains(node.id_start()); - let mut arr = self.nodes.entry(client_id).or_default(); + let arr = self.nodes.entry(client_id).or_default(); if contains_start { arr.pop(); arr.push(node.clone()); @@ -542,7 +542,7 @@ mod find_path { } // println!("{}", a.mermaid()); - let mut vec: Vec<_> = nodes.iter().enumerate().collect(); + let vec: Vec<_> = nodes.iter().enumerate().collect(); for &(i, (node, vv)) in vec.iter() { if i > 3 { break; @@ -1059,7 +1059,7 @@ mod dag_partial_iter { break; } - for &(j, (other_node, other_vv)) in vec.iter() { + for &(j, (_other_node, other_vv)) in vec.iter() { if i >= j { continue; } diff --git a/crates/loro-core/src/log_store.rs b/crates/loro-core/src/log_store.rs index 4fb71601..e0224a80 100644 --- a/crates/loro-core/src/log_store.rs +++ b/crates/loro-core/src/log_store.rs @@ -15,7 +15,7 @@ use smallvec::SmallVec; use crate::{ change::{Change, ChangeMergeCfg}, configure::Configure, - container::{manager::ContainerManager, text::string_pool::StringPool, Container}, + container::{manager::ContainerManager, Container}, id::{ClientID, Counter}, op::OpProxy, Lamport, Op, Timestamp, ID, @@ -70,7 +70,9 @@ impl LogStore { container: Arc>, ) -> Arc> { let this_client_id = client_id.unwrap_or_else(|| cfg.rand.next_u64()); - let mut this = Arc::new(RwLock::new(Self { + + + Arc::new(RwLock::new(Self { cfg, this_client_id, changes: FxHashMap::default(), @@ -79,9 +81,7 @@ impl LogStore { frontier: Default::default(), container, _pin: PhantomPinned, - })); - - this + })) } #[inline] diff --git a/crates/loro-core/src/version.rs b/crates/loro-core/src/version.rs index 6fbff620..ac6a02fd 100644 --- a/crates/loro-core/src/version.rs +++ b/crates/loro-core/src/version.rs @@ -1,6 +1,6 @@ use std::{ cmp::Ordering, - ops::{Deref, DerefMut, Sub}, + ops::{Deref, DerefMut}, }; use fxhash::FxHashMap;