diff --git a/src/future_moves.rs b/src/future_moves.rs index 384648a..58e650e 100644 --- a/src/future_moves.rs +++ b/src/future_moves.rs @@ -101,7 +101,10 @@ impl FutureMoves { pub fn extend_layers(&mut self) { let mut next_nodes: Vec = (0..self.arena.len()) // we want to select all nodes that don't have children, or are lazy (need to maybe be regenerated) - .filter(|&idx| self.arena[idx].children.is_empty() || self.arena[idx].lazy_children) + .filter(|&idx| { + let got = &self.arena[idx]; + got.lazy_children || got.children.is_empty() + }) .filter(|&idx| self.is_connected_to_root(idx)) // put here so this will not extend needlessly before prunes .collect();