Skip to content

Commit 8e2b45a

Browse files
committed
Refactor a bit, refs #4
1 parent d3acbd4 commit 8e2b45a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

03/src/main.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@ fn main() -> io::Result<()> {
2929
Lowercase item types a through z have priorities 1 through 26.
3030
Uppercase item types A through Z have priorities 27 through 52.
3131
*/
32-
let prioriy_u8 = match duplicate {
32+
let priority = match duplicate {
3333
'a'..='z' => duplicate as u8 - 'a' as u8 + 1,
3434
'A'..='Z' => duplicate as u8 - 'A' as u8 + 27,
3535
_ => 0,
36-
};
37-
let priority = prioriy_u8 as i32;
36+
} as i32;
3837
println!("{}: {}", line, priority);
3938
score += priority;
4039
}

0 commit comments

Comments
 (0)