Skip to content

Commit ea63e22

Browse files
committed
refactor: Explicitly check 'None' case in match statement
1 parent 2f12210 commit ea63e22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/day01.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub fn solve_part2(input: &str) -> i32 {
2121
for v in left {
2222
match total_amount_right.get(&v) {
2323
Some(&amount) => sum_of_similarity += v * amount,
24-
_ => {
24+
None => {
2525
let mut amount_right = 0;
2626
for rv in &right {
2727
if *rv == v {

0 commit comments

Comments
 (0)