diff --git a/src/day07.rs b/src/day07.rs index 036b291..b31f857 100644 --- a/src/day07.rs +++ b/src/day07.rs @@ -135,8 +135,8 @@ fn solve_part2(input: &[CliOperation]) -> usize { let necessary_to_free = 30_000_000 - free_space; tree.traverse_post_order(tree.root_node_id().unwrap()) .unwrap() - .filter(|node| node.data().1 >= necessary_to_free) .map(|node| node.data().1) + .filter(|&size| size >= necessary_to_free) .min() .unwrap() }