diff --git a/src/utils/config.rs b/src/utils/config.rs index f8c92e87..3810b1ff 100644 --- a/src/utils/config.rs +++ b/src/utils/config.rs @@ -156,6 +156,7 @@ impl Default for PerformanceConfig { #[derive(Debug, Serialize, Deserialize, Clone)] #[serde(default)] +#[derive(Default)] pub struct Config { pub scanner: ScannerConfig, pub database: DatabaseConfig, @@ -163,16 +164,6 @@ pub struct Config { pub performance: PerformanceConfig, } -impl Default for Config { - fn default() -> Self { - Self { - scanner: ScannerConfig::default(), - database: DatabaseConfig::default(), - output: OutputConfig::default(), - performance: PerformanceConfig::default(), - } - } -} impl Config { pub fn load( diff --git a/src/walk.rs b/src/walk.rs index 95707b56..12164166 100644 --- a/src/walk.rs +++ b/src/walk.rs @@ -76,7 +76,7 @@ pub fn spawn_senders( let mut b = Batcher { tx: tx.clone(), batch: Vec::with_capacity(BATCH_SIZE) }; match entry { - Ok(e) if e.file_type().map_or(false, |ft| ft.is_file()) => { + Ok(e) if e.file_type().is_some_and(|ft| ft.is_file()) => { b.push(e.into_path()); if batch.len() == BATCH_SIZE { let _ = tx.send(std::mem::take(&mut batch));