From 5c0517d1317bd86b061508e18cf695aad1682a83 Mon Sep 17 00:00:00 2001 From: min Date: Sat, 29 Nov 2025 23:17:19 -0500 Subject: [PATCH] fix lints --- src/cache.rs | 4 ++-- src/engine.rs | 12 ++++-------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index 89ae011..b64dc84 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -5,7 +5,7 @@ use std::{ use atomic_time::AtomicSystemTime; use bytes::Bytes; -use dashmap::{mapref::one::Ref, DashMap}; +use dashmap::{DashMap, mapref::one::Ref}; use tokio::time; use crate::config; @@ -169,7 +169,7 @@ impl Cache { /// /// It exists so we can run the expiry check before /// actually working with any entries, so no weird bugs happen - fn get_(&self, key: &str) -> Option> { + fn get_(&self, key: &str) -> Option> { let e = self.map.get(key)?; // if the entry is expired get rid of it now diff --git a/src/engine.rs b/src/engine.rs index 4972409..849565d 100644 --- a/src/engine.rs +++ b/src/engine.rs @@ -289,8 +289,6 @@ impl Engine { let len = full_data.len() as u64; - tracing::info!("data len is {}", data.len()); - (data, len) } else { // not in cache, so try disk @@ -409,12 +407,10 @@ impl Engine { // if we have an i/o task, send it off // also cloning this is okay because it's a Bytes - if !coalesce_and_strip { - if let Some(ref tx) = tx { - debug!("sending chunk to i/o task"); - tx.send(chunk.clone()) - .wrap_err("failed to send chunk to i/o task!")?; - } + if !coalesce_and_strip && let Some(ref tx) = tx { + debug!("sending chunk to i/o task"); + tx.send(chunk.clone()) + .wrap_err("failed to send chunk to i/o task!")?; } // add to sample if we need to