diff --git a/src/day2/1.rs b/src/day2/1.rs index 629f382..d8171e1 100644 --- a/src/day2/1.rs +++ b/src/day2/1.rs @@ -25,18 +25,21 @@ fn process(data: &[u8]) -> u64 { line = &l[3..]; if num > 12 { possible = false; + break; } } [b'g', ..] => { line = &l[5..]; if num > 13 { possible = false; + break; } } [b'b', ..] => { line = &l[4..]; if num > 14 { possible = false; + break; } } [b' ', ..] => line = l,