diff options
Diffstat (limited to 'rustlings-macros/info.toml')
| -rw-r--r-- | rustlings-macros/info.toml | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/rustlings-macros/info.toml b/rustlings-macros/info.toml index b848e0e..4ef1a0a 100644 --- a/rustlings-macros/info.toml +++ b/rustlings-macros/info.toml @@ -1183,13 +1183,11 @@ hint = """ The implementation of `FromStr` should return an `Ok` with a `Person` object, or an `Err` with an error if the string is not valid. -This is almost like the `from_into` exercise, but returning errors instead -of falling back to a default value. +This is almost like the previous `from_into` exercise, but returning errors +instead of falling back to a default value. -Look at the test cases to see which error variants to return. - -Another hint: You can use the `map_err` method of `Result` with a function -or a closure to wrap the error from `parse::<usize>`. +Another hint: You can use the `map_err` method of `Result` with a function or a +closure to wrap the error from `parse::<u8>`. Yet another hint: If you would like to propagate errors by using the `?` operator in your solution, you might want to look at |
