2022 rust day 11
This commit is contained in:
parent
d5fcc9f816
commit
ae36a0e2e5
|
@ -67,7 +67,7 @@ fn solve2(data: &Vec<Monkey>) -> i64 {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn get_next_number(re: &Regex, chunk: &mut dyn Iterator<Item=&str>) -> i64 {
|
fn get_next_number<'a, 'b>(re: &Regex, chunk: &'a mut impl Iterator<Item=&'b str>) -> i64 {
|
||||||
re.find(chunk.next().unwrap()).unwrap()
|
re.find(chunk.next().unwrap()).unwrap()
|
||||||
.as_str()
|
.as_str()
|
||||||
.parse().unwrap()
|
.parse().unwrap()
|
||||||
|
|
Loading…
Reference in a new issue