diff --git a/exercises/23_conversions/conversions3.rs b/exercises/23_conversions/conversions3.rs index 71bae845..74217820 100644 --- a/exercises/23_conversions/conversions3.rs +++ b/exercises/23_conversions/conversions3.rs @@ -1,7 +1,9 @@ -// In this exercise, we'll implement `FromStr` and return errors instead of -// falling back to a default value. Additionally, upon implementing `FromStr`, -// you can use the `parse` method on strings to generate an object of the -// implementor type. You can read more about it in the documentation: +// In this exercise, we'll implement `FromStr` to convert data stored as a +// string into a structured type. Unlike the `From` trait, the conversion +// expressed by `FromStr` can fail, so it returns a `Result`. Additionally, +// upon implementing `FromStr`, you can use the `parse` method on strings to +// generate an object of the implementor type. You can read more about it in +// the documentation: // https://doc.rust-lang.org/std/str/trait.FromStr.html use std::num::ParseIntError; diff --git a/solutions/23_conversions/conversions3.rs b/solutions/23_conversions/conversions3.rs index 64e23a02..95c23370 100644 --- a/solutions/23_conversions/conversions3.rs +++ b/solutions/23_conversions/conversions3.rs @@ -1,7 +1,9 @@ -// In this exercise, we'll implement `FromStr` and return errors instead of -// falling back to a default value. Additionally, upon implementing `FromStr`, -// you can use the `parse` method on strings to generate an object of the -// implementor type. You can read more about it in the documentation: +// In this exercise, we'll implement `FromStr` to convert data stored as a +// string into a structured type. Unlike the `From` trait, the conversion +// expressed by `FromStr` can fail, so it returns a `Result`. Additionally, +// upon implementing `FromStr`, you can use the `parse` method on strings to +// generate an object of the implementor type. You can read more about it in +// the documentation: // https://doc.rust-lang.org/std/str/trait.FromStr.html use std::num::ParseIntError;