From 01188b501b7f2940936a06bd8d4d11bab9adf372 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Tue, 6 Dec 2022 22:10:27 +0100 Subject: day2 readable --- 2022/day2/src/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to '2022') 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 { input .trim() - .split('\n') - .collect::>() - .into_iter() + .lines() .map(|x| Play::new(x)) .collect::>() } -- cgit v1.2.3-18-g5258