chore: cargo fix

This commit is contained in:
Zixuan Chen 2022-10-19 20:44:11 +08:00
parent 9cd360e511
commit f3b36680f9
5 changed files with 11 additions and 11 deletions

View file

@ -1,4 +1,4 @@
use std::sync::Arc;
use fxhash::FxHashMap;

View file

@ -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!()
}

View file

@ -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;
}

View file

@ -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<RwLock<ContainerManager>>,
) -> Arc<RwLock<Self>> {
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]

View file

@ -1,6 +1,6 @@
use std::{
cmp::Ordering,
ops::{Deref, DerefMut, Sub},
ops::{Deref, DerefMut},
};
use fxhash::FxHashMap;