From efec43b3b8827820cf35fe1b73d8e33f5fe84eb4 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 20 Jun 2026 01:16:50 +0900 Subject: refactor: auto-fix clippy warnings --- crates/shirabe/src/package/comparer/comparer.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'crates/shirabe/src/package/comparer/comparer.rs') diff --git a/crates/shirabe/src/package/comparer/comparer.rs b/crates/shirabe/src/package/comparer/comparer.rs index 73c94f4..d23e669 100644 --- a/crates/shirabe/src/package/comparer/comparer.rs +++ b/crates/shirabe/src/package/comparer/comparer.rs @@ -12,6 +12,12 @@ pub struct Comparer { changed: IndexMap>, } +impl Default for Comparer { + fn default() -> Self { + Self::new() + } +} + impl Comparer { pub fn new() -> Self { Self { @@ -96,7 +102,7 @@ impl Comparer { } for (dir, value) in &destination { for (file, _hash) in value { - if !source.get(dir).map_or(false, |d| d.contains_key(file)) { + if !source.get(dir).is_some_and(|d| d.contains_key(file)) { self.changed .entry("added".to_string()) .or_default() -- cgit v1.3.1