From 7a1141f5ee0e33a1a4963a766a10f8e28cec4209 Mon Sep 17 00:00:00 2001 From: "max.nuding" Date: Wed, 7 Dec 2022 09:20:59 +0100 Subject: [PATCH] Improved finding min value --- src/day07/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/day07/mod.rs b/src/day07/mod.rs index 3ada1bc..33c0c86 100644 --- a/src/day07/mod.rs +++ b/src/day07/mod.rs @@ -1,5 +1,4 @@ use crate::read; -use itertools::Itertools; use indextree::Arena; #[derive(Debug)] @@ -60,8 +59,7 @@ pub fn run() { println!("Day 7, Part 02: {}", total.iter() .filter(|s|*s >= &free_needed) - .sorted() - .next() + .min() .unwrap()); } }