mirror of
https://github.com/rust-lang/rustlings
synced 2024-11-10 06:34:20 +00:00
chore: Update errors5.rs exercise to be consistent with solution
In errors5.rs, there are two lines of a pattern matching block for which the order is reversed between the exercise file and the solution file. Since these lines are not changed as part of the exercise, this commit updates the exercise to make the order of the lines consistent with the solution, so that users will focus only on the lines that change between the exercise and the solution.
This commit is contained in:
parent
9e2ff7d037
commit
fdada8b3d4
1 changed files with 1 additions and 1 deletions
|
@ -39,8 +39,8 @@ struct PositiveNonzeroInteger(u64);
|
|||
impl PositiveNonzeroInteger {
|
||||
fn new(value: i64) -> Result<PositiveNonzeroInteger, CreationError> {
|
||||
match value {
|
||||
0 => Err(CreationError::Zero),
|
||||
x if x < 0 => Err(CreationError::Negative),
|
||||
0 => Err(CreationError::Zero),
|
||||
x => Ok(PositiveNonzeroInteger(x as u64)),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue