diff --git a/src/cmd/benchmark.rs b/src/cmd/benchmark.rs index 19c7d8f..c4a4353 100644 --- a/src/cmd/benchmark.rs +++ b/src/cmd/benchmark.rs @@ -1,5 +1,3 @@ -#![allow(clippy::len_zero)] - use crate::cmd::index; use anyhow::anyhow; use chrono::DateTime; @@ -168,7 +166,7 @@ impl JwalkParStat { cb = path_tx.send_vec(cb).unwrap(); } } - if cb.len() > 0 { + if !cb.is_empty() { path_tx.send_vec(cb).unwrap(); } }); diff --git a/src/cmd/mod.rs b/src/cmd/mod.rs index 8521887..15313b6 100644 --- a/src/cmd/mod.rs +++ b/src/cmd/mod.rs @@ -1,5 +1,3 @@ -#![allow(clippy::let_unit_value)] - use clap::Subcommand; mod benchmark; diff --git a/src/database.rs b/src/database.rs index 249909c..0902eba 100644 --- a/src/database.rs +++ b/src/database.rs @@ -146,11 +146,6 @@ impl Database { fn conn(&self) -> &Connection { self.0.borrow_owner() } - - #[allow(unused)] - fn conn_mut(&mut self) -> &Connection { - self.0.borrow_owner() - } } impl Database { diff --git a/src/lib.rs b/src/lib.rs index dee13f9..b559738 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,3 @@ -// TODO: fix -#![allow(dead_code)] - pub mod database; pub mod hash; pub mod iopool; diff --git a/src/scan.rs b/src/scan.rs index be5394d..8af7783 100644 --- a/src/scan.rs +++ b/src/scan.rs @@ -1,6 +1,3 @@ -#![allow(clippy::len_zero)] -#![allow(clippy::redundant_pattern_matching)] - use crate::model::FileInfo; use crate::model::IMPath; use anyhow::Context; @@ -160,7 +157,7 @@ fn jwalk_scan( if paths.is_empty() { return; } - if let Err(_) = tx + let Ok(()) = tx .send_iter(paths.into_iter().map(|(p, result)| match result { Ok(()) => { let metadata = std::fs::symlink_metadata(&p) @@ -171,10 +168,10 @@ fn jwalk_scan( Err(e) => (p, Err(e)), })) .await - { + else { // Receiver dropped; we can early-exit. return; - } + }; } }); }