diff --git a/src/main.rs b/src/main.rs index 6e8a2d8..1dc97dd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -349,7 +349,7 @@ fn register(path: PathBuf, registry: &mut HashMap>, cfg: &Conf if path.is_file() { let size = metadata.st_size(); if size >= cfg.min_size { - registry.entry(size).or_insert(Vec::new()).push(path); + registry.entry(size).or_insert_with(|| Vec::new()).push(path); } } else if path.is_dir() { if let Ok(entries) = std::fs::read_dir(path) {