diff --git a/2021/day8/day8_rs/src/v2.rs b/2021/day8/day8_rs/src/v2.rs index df958d1..735b4ac 100644 --- a/2021/day8/day8_rs/src/v2.rs +++ b/2021/day8/day8_rs/src/v2.rs @@ -32,7 +32,7 @@ pub fn unscramble(line: &str) -> LineResult { let digits = parts .next() .unwrap() - .trim() + .trim_start() .split(' ') .map(|s| s.bytes().map(|c| counts[c as usize - b'a' as usize]).sum()) .map(|n: usize| FREQ_TABLE[n])