summaryrefslogtreecommitdiff
path: root/exercises/error_handling/errors2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'exercises/error_handling/errors2.rs')
-rw-r--r--exercises/error_handling/errors2.rs26
1 files changed, 1 insertions, 25 deletions
diff --git a/exercises/error_handling/errors2.rs b/exercises/error_handling/errors2.rs
index 8b81207..5ac6339 100644
--- a/exercises/error_handling/errors2.rs
+++ b/exercises/error_handling/errors2.rs
@@ -14,7 +14,7 @@
// and add.
// There are at least two ways to implement this that are both correct-- but
-// one is a lot shorter! Scroll down for hints to both ways.
+// one is a lot shorter! Execute `rustlings hint errors2` for hints to both ways.
use std::num::ParseIntError;
@@ -43,27 +43,3 @@ mod tests {
);
}
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-// One way to handle this is using a `match` statement on
-// `item_quantity.parse::<i32>()` where the cases are `Ok(something)` and
-// `Err(something)`. This pattern is very common in Rust, though, so there's
-// a `?` operator that does pretty much what you would make that match statement
-// do for you! Take a look at this section of the Error Handling chapter:
-// https://doc.rust-lang.org/book/ch09-02-recoverable-errors-with-result.html#a-shortcut-for-propagating-errors-the--operator
-// and give it a try!