From 980d0a718aa35fc25737c2e6f03cb05996a07ce1 Mon Sep 17 00:00:00 2001 From: bsbds <69835502+bsbds@users.noreply.github.com> Date: Tue, 9 Apr 2024 14:33:05 +0800 Subject: [PATCH] chore: fix clippy Signed-off-by: bsbds <69835502+bsbds@users.noreply.github.com> --- crates/curp/src/server/conflict/tests.rs | 2 +- crates/curp/src/server/raw_curp/tests.rs | 4 ++-- crates/xline/src/server/xline_server.rs | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/curp/src/server/conflict/tests.rs b/crates/curp/src/server/conflict/tests.rs index 6dff83c80..6acd87947 100644 --- a/crates/curp/src/server/conflict/tests.rs +++ b/crates/curp/src/server/conflict/tests.rs @@ -182,7 +182,7 @@ fn sp_should_returns_all_entries() { for e in entries.clone() { sp.insert(e); } - /// conflict entries should not be inserted + // conflict entries should not be inserted for e in entries.clone() { assert!(sp.insert(e).is_some()); } diff --git a/crates/curp/src/server/raw_curp/tests.rs b/crates/curp/src/server/raw_curp/tests.rs index 716ada3c2..a1f0f4543 100644 --- a/crates/curp/src/server/raw_curp/tests.rs +++ b/crates/curp/src/server/raw_curp/tests.rs @@ -80,10 +80,10 @@ impl RawCurp { Reverse(Instant::now().add(Duration::from_nanos(u64::MAX))), ); - let sp = Arc::new(Mutex::new(SpecPool::new(vec![Box::new( + let sp = Arc::new(Mutex::new(SpeculativePool::new(vec![Box::new( TestSpecPool::default(), )]))); - let ucp = Arc::new(Mutex::new(UncomPool::new(vec![Box::new( + let ucp = Arc::new(Mutex::new(UncommittedPool::new(vec![Box::new( TestUncomPool::default(), )]))); diff --git a/crates/xline/src/server/xline_server.rs b/crates/xline/src/server/xline_server.rs index 221fb8ff8..9020e7dbe 100644 --- a/crates/xline/src/server/xline_server.rs +++ b/crates/xline/src/server/xline_server.rs @@ -47,8 +47,8 @@ use super::{ }; use crate::{ conflict::{ - spec_pool::{KvSpecPool, LeaseSpecPool, XorSpecPool}, - uncommitted_pool::{KvUncomPool, LeaseUncomPool, XorUncomPool}, + spec_pool::{ExclusiveSpecPool, KvSpecPool, LeaseSpecPool}, + uncommitted_pool::{ExclusiveUncomPool, KvUncomPool, LeaseUncomPool}, }, header_gen::HeaderGenerator, id_gen::IdGenerator, @@ -701,10 +701,10 @@ impl XlineServer { fn init_conflict_pools() -> (Vec>, Vec>) { let kv_sp = Box::::default(); let lease_sp = Box::::default(); - let xor_sp = Box::::default(); + let xor_sp = Box::::default(); let kv_ucp = Box::::default(); let lease_ucp = Box::::default(); - let xor_ucp = Box::::default(); + let xor_ucp = Box::::default(); ( vec![kv_sp, lease_sp, xor_sp], vec![kv_ucp, lease_ucp, xor_ucp],