summaryrefslogtreecommitdiff
path: root/2022/day2/src
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2022-12-06 22:10:27 +0100
committerSanto Cariotti <santo@dcariotti.me>2022-12-06 22:10:27 +0100
commit01188b501b7f2940936a06bd8d4d11bab9adf372 (patch)
treeb59ba806aa6fbed1cf7a88cc8c0c444fe25835af /2022/day2/src
parentb23c4ab4c0669ee3af5dd9f2c4e33f51c776fc17 (diff)
day2 readable
Diffstat (limited to '2022/day2/src')
-rw-r--r--2022/day2/src/lib.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/2022/day2/src/lib.rs b/2022/day2/src/lib.rs
index 435c8f7..4436d36 100644
--- a/2022/day2/src/lib.rs
+++ b/2022/day2/src/lib.rs
@@ -111,9 +111,7 @@ impl Play {
fn get_plays(input: &str) -> Vec<Play> {
input
.trim()
- .split('\n')
- .collect::<Vec<&str>>()
- .into_iter()
+ .lines()
.map(|x| Play::new(x))
.collect::<Vec<Play>>()
}