From 42c911c9a2293ec9438b1d7f22cc15195888bfaf Mon Sep 17 00:00:00 2001 From: pjht Date: Wed, 7 Dec 2022 13:25:45 -0600 Subject: [PATCH] Clean up part 2 --- src/day07.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() }