Improved finding min value
This commit is contained in:
parent
cb204b8d62
commit
7a1141f5ee
@ -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());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user