Skip to content

Commit c9017f9

Browse files
authored
Merge pull request #2022 from matthewjnield/main
chore: Update errors5.rs exercise to be consistent with solution
2 parents 9e2ff7d + fdada8b commit c9017f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exercises/13_error_handling/errors5.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ struct PositiveNonzeroInteger(u64);
3939
impl PositiveNonzeroInteger {
4040
fn new(value: i64) -> Result<PositiveNonzeroInteger, CreationError> {
4141
match value {
42-
0 => Err(CreationError::Zero),
4342
x if x < 0 => Err(CreationError::Negative),
43+
0 => Err(CreationError::Zero),
4444
x => Ok(PositiveNonzeroInteger(x as u64)),
4545
}
4646
}

0 commit comments

Comments
 (0)