diff options
Diffstat (limited to 'rustlings-macros/info.toml')
| -rw-r--r-- | rustlings-macros/info.toml | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/rustlings-macros/info.toml b/rustlings-macros/info.toml index 700c179..dc288c0 100644 --- a/rustlings-macros/info.toml +++ b/rustlings-macros/info.toml @@ -714,17 +714,13 @@ https://doc.rust-lang.org/stable/rust-by-example/error/multiple_error_types/reen name = "errors6" dir = "13_error_handling" hint = """ -This exercise uses a completed version of `PositiveNonzeroInteger` from -errors4. +This exercise uses a completed version of `PositiveNonzeroInteger` from the +previous exercises. Below the line that `TODO` asks you to change, there is an example of using the `map_err()` method on a `Result` to transform one type of error into another. Try using something similar on the `Result` from `parse()`. You -might use the `?` operator to return early from the function, or you might -use a `match` expression, or maybe there's another way! - -You can create another function inside `impl ParsePosNonzeroError` to use -with `map_err()`. +can then use the `?` operator to return early. Read more about `map_err()` in the `std::result` documentation: https://doc.rust-lang.org/std/result/enum.Result.html#method.map_err""" |
