diff options
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() }) |
