diff options
| author | marisa <mokou@posteo.de> | 2019-11-11 16:51:38 +0100 |
|---|---|---|
| committer | marisa <mokou@posteo.de> | 2019-11-11 16:51:38 +0100 |
| commit | 9bdb0a12e45a8e9f9f6a4bd4a9c172c5376c7f60 (patch) | |
| tree | 3c4a094d57ecedf9706e0ba567a9f157590177c8 /exercises/error_handling/result1.rs | |
| parent | 627cdc07d07dfe6a740e885e0ddf6900e7ec336b (diff) | |
feat: Refactor hint system
Hints are now accessible using the CLI subcommand `rustlings hint
<exercise name`.
BREAKING CHANGE: This fundamentally changes the way people interact with exercises.
Diffstat (limited to 'exercises/error_handling/result1.rs')
| -rw-r--r-- | exercises/error_handling/result1.rs | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/exercises/error_handling/result1.rs b/exercises/error_handling/result1.rs index f9596e2..c3f2d6e 100644 --- a/exercises/error_handling/result1.rs +++ b/exercises/error_handling/result1.rs @@ -1,5 +1,5 @@ // result1.rs -// Make this test pass! Scroll down for hints :) +// Make this test pass! Execute `rustlings hint option2` for hints :) #[derive(PartialEq, Debug)] struct PositiveNonzeroInteger(u64); @@ -25,22 +25,3 @@ fn test_creation() { ); assert_eq!(Err(CreationError::Zero), PositiveNonzeroInteger::new(0)); } - - - - - - - - - - - - - - - - -// `PositiveNonzeroInteger::new` is always creating a new instance and returning an `Ok` result. -// It should be doing some checking, returning an `Err` result if those checks fail, and only -// returning an `Ok` result if those checks determine that everything is... okay :) |
