summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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>>()
}