Skip to content

Commit

Permalink
clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bryevdv committed Oct 9, 2023
1 parent ab47a8e commit 323c170
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ impl SearchState {
if !self.result_cache.contains_key(entry.entry_id()) {
self.result_cache
.entry(entry.entry_id().clone())
.or_insert_with(BTreeMap::new);
.or_default();
}

// Always recurse into tiles, because results can be fetched
Expand All @@ -1215,7 +1215,7 @@ impl SearchState {
.and_modify(|_| {
result = false;
})
.or_insert_with(BTreeMap::new);
.or_default();
result
}

Expand Down Expand Up @@ -1251,13 +1251,8 @@ impl SearchState {
let level1_index = entry_id.slot_index(1).unwrap();
let level2_index = entry_id.slot_index(2).unwrap();

let level0_subtree = self
.entry_tree
.entry(level0_index)
.or_insert_with(BTreeMap::new);
let level1_subtree = level0_subtree
.entry(level1_index)
.or_insert_with(BTreeSet::new);
let level0_subtree = self.entry_tree.entry(level0_index).or_default();
let level1_subtree = level0_subtree.entry(level1_index).or_default();
level1_subtree.insert(level2_index);
}
}
Expand Down

0 comments on commit 323c170

Please sign in to comment.