summaryrefslogtreecommitdiff
path: root/rustlings-macros
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2024-07-02 01:26:09 +0200
committermo8it <mo8it@proton.me>2024-07-02 01:26:09 +0200
commit5217cdc5e2c49d179497e5ef65d0dc8bff1e0950 (patch)
tree07610ade5ef19c971fbc06f0ad89f5352b105d49 /rustlings-macros
parente3c8c457ba8744b0f1b799c4d7d4bf24e8e61792 (diff)
try_from_into solution
Diffstat (limited to 'rustlings-macros')
-rw-r--r--rustlings-macros/info.toml17
1 files changed, 2 insertions, 15 deletions
diff --git a/rustlings-macros/info.toml b/rustlings-macros/info.toml
index 4ef1a0a..488fdac 100644
--- a/rustlings-macros/info.toml
+++ b/rustlings-macros/info.toml
@@ -1197,21 +1197,8 @@ https://doc.rust-lang.org/stable/rust-by-example/error/multiple_error_types/reen
name = "try_from_into"
dir = "23_conversions"
hint = """
-Follow the steps provided right before the `TryFrom` implementation.
-You can also use the example at
-https://doc.rust-lang.org/std/convert/trait.TryFrom.html
-
-Is there an implementation of `TryFrom` in the standard library that
-can both do the required integer conversion and check the range of the input?
-
-Another hint: Look at the test cases to see which error variants to return.
-
-Yet another hint: You can use the `map_err` or `or` methods of `Result` to
-convert errors.
-
-Yet another hint: If you would like to propagate errors by using the `?`
-operator in your solution, you might want to look at
-https://doc.rust-lang.org/stable/rust-by-example/error/multiple_error_types/reenter_question_mark.html
+Is there an implementation of `TryFrom` in the standard library that can both do
+the required integer conversion and check the range of the input?
Challenge: Can you make the `TryFrom` implementations generic over many integer types?"""