From ac73586fd01ed2e6310a5022115a23057a1bc345 Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Sat, 2 Dec 2023 11:38:06 +0200 Subject: Almost finished parsing day2 input --- 2023/Rust/src/day1.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '2023/Rust/src/day1.rs') diff --git a/2023/Rust/src/day1.rs b/2023/Rust/src/day1.rs index 09cd49a..c8fae40 100644 --- a/2023/Rust/src/day1.rs +++ b/2023/Rust/src/day1.rs @@ -4,7 +4,7 @@ fn solve_part_one(data: &str) -> u32 { .collect::>() .iter() .map(|x| { - format!("{}{}", x.chars().nth(0).unwrap(), x.chars().last().unwrap()) + format!("{}{}", x.chars().next().unwrap(), x.chars().last().unwrap()) .parse::() .unwrap() }) -- cgit v1.2.3