summaryrefslogtreecommitdiff
path: root/exercises/error_handling/errorsn.rs
diff options
context:
space:
mode:
Diffstat (limited to 'exercises/error_handling/errorsn.rs')
-rw-r--r--exercises/error_handling/errorsn.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/exercises/error_handling/errorsn.rs b/exercises/error_handling/errorsn.rs
index cd76d5b..8d39967 100644
--- a/exercises/error_handling/errorsn.rs
+++ b/exercises/error_handling/errorsn.rs
@@ -65,7 +65,7 @@ fn test_ioerror() {
assert_eq!("uh-oh!", read_and_validate(&mut b).unwrap_err().to_string());
}
-#[derive(PartialEq,Debug)]
+#[derive(PartialEq, Debug)]
struct PositiveNonzeroInteger(u64);
impl PositiveNonzeroInteger {
@@ -83,11 +83,14 @@ impl PositiveNonzeroInteger {
#[test]
fn test_positive_nonzero_integer_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));
}
-#[derive(PartialEq,Debug)]
+#[derive(PartialEq, Debug)]
enum CreationError {
Negative,
Zero,