From 50c7a827c95469fd36b8bf049bdeb09787ed82c4 Mon Sep 17 00:00:00 2001 From: Zixuan Chen Date: Thu, 21 Jul 2022 00:40:37 +0800 Subject: [PATCH] chore: cargo fix --- crates/loro-framework/src/loro.rs | 2 -- crates/loro-framework/src/raw_change.rs | 4 ++-- crates/loro-framework/src/raw_store.rs | 8 ++++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/crates/loro-framework/src/loro.rs b/crates/loro-framework/src/loro.rs index 1a709d84..feed678c 100644 --- a/crates/loro-framework/src/loro.rs +++ b/crates/loro-framework/src/loro.rs @@ -1,5 +1,3 @@ -use std::pin::Pin; - use loro_core::{id::ClientID, LoroCore}; use crate::raw_store::RawStore; diff --git a/crates/loro-framework/src/raw_change.rs b/crates/loro-framework/src/raw_change.rs index 2fc336f4..111a67ea 100644 --- a/crates/loro-framework/src/raw_change.rs +++ b/crates/loro-framework/src/raw_change.rs @@ -45,14 +45,14 @@ impl HasLength for ChangeData { } impl Mergable for ChangeData { - fn is_mergable(&self, other: &Self, conf: &()) -> bool + fn is_mergable(&self, _other: &Self, _conf: &()) -> bool where Self: Sized, { false } - fn merge(&mut self, other: &Self, conf: &()) + fn merge(&mut self, _other: &Self, _conf: &()) where Self: Sized, { diff --git a/crates/loro-framework/src/raw_store.rs b/crates/loro-framework/src/raw_store.rs index 4c4aceb9..ea01d912 100644 --- a/crates/loro-framework/src/raw_store.rs +++ b/crates/loro-framework/src/raw_store.rs @@ -27,7 +27,7 @@ impl RawStore { unimplemented!() } - pub fn verify(&mut self, pub_key: &[u8; 32]) -> bool { + pub fn verify(&mut self, _pub_key: &[u8; 32]) -> bool { if !self.maced() { return true; } @@ -37,7 +37,7 @@ impl RawStore { } self.calc_hash(); - for (clientId, mac) in self.macs.as_ref().unwrap().iter() { + for (_clientId, _mac) in self.macs.as_ref().unwrap().iter() { todo!("pending"); } @@ -51,7 +51,7 @@ impl RawStore { } fn calc_hash(&mut self) { - for (client_id, changes) in &mut self.changes { + for (_client_id, changes) in &mut self.changes { let changes = changes.vec_mut(); let mut start_index = 0; for i in (0..changes.len()).rev() { @@ -80,7 +80,7 @@ impl RawStore { version_vector } - pub fn sign(&self, pub_key: ()) { + pub fn sign(&self, _pub_key: ()) { unimplemented!() } }