From 94fbb4282924e7b90c90554a54d9eb522708d7b3 Mon Sep 17 00:00:00 2001 From: ascendforever Date: Sun, 13 Oct 2024 16:15:52 -0400 Subject: [PATCH] minor programming change --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {