diff options
| author | mfurak <marek.furak@gmail.com> | 2022-11-06 20:28:34 +0100 |
|---|---|---|
| committer | mfurak <marek.furak@gmail.com> | 2022-11-06 20:32:43 +0100 |
| commit | d01ce8304e018b815cbd4488034f2339c749b6b1 (patch) | |
| tree | 4fb6028b234478536b0f0ed70dea78d030a2cbda /exercises/error_handling/errors5.rs | |
| parent | 8b0507cac80a4e0bbaa209336987723026e49285 (diff) | |
style: format errors5 with rustfmt
Diffstat (limited to 'exercises/error_handling/errors5.rs')
| -rw-r--r-- | exercises/error_handling/errors5.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/exercises/error_handling/errors5.rs b/exercises/error_handling/errors5.rs index 2ba8f90..6da06ef 100644 --- a/exercises/error_handling/errors5.rs +++ b/exercises/error_handling/errors5.rs @@ -7,7 +7,7 @@ // For now, think of the `Box<dyn ...>` type as an "I want anything that does ???" type, which, given // Rust's usual standards for runtime safety, should strike you as somewhat lenient! -// In short, this particular use case for boxes is for when you want to own a value and you care only that it is a +// In short, this particular use case for boxes is for when you want to own a value and you care only that it is a // type which implements a particular trait. To do so, The Box is declared as of type Box<dyn Trait> where Trait is the trait // the compiler looks for on any value used in that context. For this exercise, that context is the potential errors // which can be returned in a Result. @@ -46,7 +46,7 @@ impl PositiveNonzeroInteger { match value { x if x < 0 => Err(CreationError::Negative), x if x == 0 => Err(CreationError::Zero), - x => Ok(PositiveNonzeroInteger(x as u64)) + x => Ok(PositiveNonzeroInteger(x as u64)), } } } |
