From c498a3e2431e1ca2f6f2d0aa530d4c51839e2ad0 Mon Sep 17 00:00:00 2001 From: Zixuan Chen Date: Fri, 12 Aug 2022 14:41:15 +0800 Subject: [PATCH] chore: fix warnings --- crates/loro-framework/src/lib.rs | 1 + crates/loro-framework/src/raw_store.rs | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/loro-framework/src/lib.rs b/crates/loro-framework/src/lib.rs index 0244c500..ac3f02f0 100644 --- a/crates/loro-framework/src/lib.rs +++ b/crates/loro-framework/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(unused)] mod encoding; mod loro; mod raw_change; diff --git a/crates/loro-framework/src/raw_store.rs b/crates/loro-framework/src/raw_store.rs index 7de5ebc5..4ab98da7 100644 --- a/crates/loro-framework/src/raw_store.rs +++ b/crates/loro-framework/src/raw_store.rs @@ -40,21 +40,21 @@ impl RawStore { } self.calc_hash(); - for (_clientId, _mac) in self.macs.as_ref().unwrap().iter() { + for (_client_id, _mac) in self.macs.as_ref().unwrap().iter() { todo!("pending"); } true } - pub fn get_final_hash(&self, clientId: ClientID) -> ChangeHash { - let changes = self.changes.get(&clientId).unwrap(); + pub fn get_final_hash(&self, client_id: ClientID) -> ChangeHash { + let changes = self.changes.get(&client_id).unwrap(); let last = changes.vec().last().unwrap(); last.hash.unwrap() } fn calc_hash(&mut self) { - for (_client_id, changes) in &mut self.changes { + for (_client_id, changes) in &mut self.changes.iter_mut() { let changes = changes.vec_mut(); let mut start_index = 0; for i in (0..changes.len()).rev() {