2021 day8/rust: only trim start of output digits
This commit is contained in:
parent
92aba2db95
commit
edd8bdfa71
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ pub fn unscramble(line: &str) -> LineResult {
|
||||||
let digits = parts
|
let digits = parts
|
||||||
.next()
|
.next()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.trim()
|
.trim_start()
|
||||||
.split(' ')
|
.split(' ')
|
||||||
.map(|s| s.bytes().map(|c| counts[c as usize - b'a' as usize]).sum())
|
.map(|s| s.bytes().map(|c| counts[c as usize - b'a' as usize]).sum())
|
||||||
.map(|n: usize| FREQ_TABLE[n])
|
.map(|n: usize| FREQ_TABLE[n])
|
||||||
|
|
Loading…
Reference in a new issue