[rs] Don't trim lines unnecessarily
This commit is contained in:
parent
f0669d159f
commit
58d59ecd97
2 changed files with 2 additions and 5 deletions
|
|
@ -71,10 +71,7 @@ fn read_round(line: &str) -> (Choice, Choice, Outcome) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn solve(input: String) {
|
pub fn solve(input: String) {
|
||||||
let matches = input
|
let matches = input.lines().map(read_round).collect::<Vec<_>>();
|
||||||
.lines()
|
|
||||||
.map(|l| read_round(l.trim()))
|
|
||||||
.collect::<Vec<_>>();
|
|
||||||
|
|
||||||
// Part 1
|
// Part 1
|
||||||
let score = matches
|
let score = matches
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ fn highest_score(i: u64) -> u32 {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn solve(input: String) {
|
pub fn solve(input: String) {
|
||||||
let backpacks = input.lines().map(|l| l.trim()).collect::<Vec<_>>();
|
let backpacks = input.lines().collect::<Vec<_>>();
|
||||||
|
|
||||||
// Part 1
|
// Part 1
|
||||||
let score = backpacks
|
let score = backpacks
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue