diff options
| author | omagdy7 <omar.professional8777@gmail.com> | 2023-12-02 11:38:06 +0200 |
|---|---|---|
| committer | omagdy7 <omar.professional8777@gmail.com> | 2023-12-02 11:38:06 +0200 |
| commit | ac73586fd01ed2e6310a5022115a23057a1bc345 (patch) | |
| tree | e09c9f6bf5f3fbcadf526b095dfb5f43c11397bb /2023/Rust/src/day1.rs | |
| parent | 47f8224ece055efe4748d65eb40fa0e6cd9483f5 (diff) | |
| download | aoc-ac73586fd01ed2e6310a5022115a23057a1bc345.tar.xz aoc-ac73586fd01ed2e6310a5022115a23057a1bc345.zip | |
Almost finished parsing day2 input
Diffstat (limited to '2023/Rust/src/day1.rs')
| -rw-r--r-- | 2023/Rust/src/day1.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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::<Vec<_>>() .iter() .map(|x| { - format!("{}{}", x.chars().nth(0).unwrap(), x.chars().last().unwrap()) + format!("{}{}", x.chars().next().unwrap(), x.chars().last().unwrap()) .parse::<u32>() .unwrap() }) |
