From cc0d984118e345c72341ff12d74b1c35deb20ae8 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 3 Jun 2022 11:14:24 +0200 Subject: Fix most clippy lints --- src/block/manager.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/block/manager.rs') diff --git a/src/block/manager.rs b/src/block/manager.rs index de9b08c2..fbca74e2 100644 --- a/src/block/manager.rs +++ b/src/block/manager.rs @@ -56,6 +56,8 @@ const RESYNC_RETRY_DELAY_MAX_BACKOFF_POWER: u64 = 6; // to delete the block locally. pub(crate) const BLOCK_GC_DELAY: Duration = Duration::from_secs(600); +type OptKVPair = Option<(Vec, Vec)>; + /// RPC messages used to share blocks of data between nodes #[derive(Debug, Serialize, Deserialize)] pub enum BlockRpc { @@ -640,7 +642,7 @@ impl BlockManager { } } - fn resync_get_next(&self) -> Result, Vec)>, db::Error> { + fn resync_get_next(&self) -> Result { match self.resync_queue.iter()?.next() { None => Ok(None), Some(v) => { @@ -970,7 +972,7 @@ impl ErrorCounter { } } - fn decode<'a>(data: db::Value<'a>) -> Self { + fn decode(data: db::Value<'_>) -> Self { Self { errors: u64::from_be_bytes(data[0..8].try_into().unwrap()), last_try: u64::from_be_bytes(data[8..16].try_into().unwrap()), -- cgit v1.2.3