diff options
Diffstat (limited to 'exercises/23_conversions/from_into.rs')
| -rw-r--r-- | exercises/23_conversions/from_into.rs | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/exercises/23_conversions/from_into.rs b/exercises/23_conversions/from_into.rs index 10836a6..14a62ba 100644 --- a/exercises/23_conversions/from_into.rs +++ b/exercises/23_conversions/from_into.rs @@ -1,11 +1,6 @@ -// from_into.rs -// // The From trait is used for value-to-value conversions. If From is implemented // correctly for a type, the Into trait should work conversely. You can read // more about it at https://doc.rust-lang.org/std/convert/trait.From.html -// -// Execute `rustlings hint from_into` or use the `hint` watch subcommand for a -// hint. #[derive(Debug)] struct Person { @@ -24,7 +19,6 @@ impl Default for Person { } } - // Your task is to complete this implementation in order for the line `let p1 = // Person::from("Mark,20")` to compile. Please note that you'll need to parse the // age component into a `usize` with something like `"4".parse::<usize>()`. The @@ -41,8 +35,6 @@ impl Default for Person { // If while parsing the age, something goes wrong, then return the default of // Person. Otherwise, then return an instantiated Person object with the results -// I AM NOT DONE - impl From<&str> for Person { fn from(s: &str) -> Person {} } |
