summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/repository/fs/representation.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/repository/fs/representation.rs b/src/repository/fs/representation.rs
index 991d791..6a57a38 100644
--- a/src/repository/fs/representation.rs
+++ b/src/repository/fs/representation.rs
@@ -87,7 +87,7 @@ impl FileSystemRepresentation {
},
dir @ PathComponent::DirName(_) => {
curr_hm.entry(dir.clone())
- .or_insert(Element::Dir(HashMap::new()));
+ .or_insert_with(|| Element::Dir(HashMap::new()));
curr_hm = curr_hm.get_mut(&dir)
.unwrap() // safe, because we just inserted it