diff options
Diffstat (limited to 'exercises/error_handling/result1.rs')
| -rw-r--r-- | exercises/error_handling/result1.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/exercises/error_handling/result1.rs b/exercises/error_handling/result1.rs index 851ab45..f9596e2 100644 --- a/exercises/error_handling/result1.rs +++ b/exercises/error_handling/result1.rs @@ -1,10 +1,10 @@ // result1.rs // Make this test pass! Scroll down for hints :) -#[derive(PartialEq,Debug)] +#[derive(PartialEq, Debug)] struct PositiveNonzeroInteger(u64); -#[derive(PartialEq,Debug)] +#[derive(PartialEq, Debug)] enum CreationError { Negative, Zero, @@ -19,7 +19,10 @@ impl PositiveNonzeroInteger { #[test] fn test_creation() { assert!(PositiveNonzeroInteger::new(10).is_ok()); - assert_eq!(Err(CreationError::Negative), PositiveNonzeroInteger::new(-10)); + assert_eq!( + Err(CreationError::Negative), + PositiveNonzeroInteger::new(-10) + ); assert_eq!(Err(CreationError::Zero), PositiveNonzeroInteger::new(0)); } |
