1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Remove needless borrow in tech tree provider

This commit is contained in:
NG (Graham)
2026-01-12 20:50:34 -05:00
parent 59b253dc52
commit 4ec0dfb0aa

View File

@@ -12,7 +12,7 @@ impl TechTreeNodeProvider {
let mut needed_cubes = std::collections::HashSet::with_capacity(self.tree.len());
let mut typed_nodes = Vec::new();
for (cube_id, tree_data) in self.tree.iter() {
let is_unlocked = unlocked_cubes.contains(&cube_id);
let is_unlocked = unlocked_cubes.contains(cube_id);
let is_unlockable = tree_data.requires.iter().all(|id| unlocked_cubes.contains(id));
tree_data.neighbours.iter().for_each(|id| { needed_cubes.insert(*id); });
seen_cubes.insert(cube_id);