|
|
@ -31,7 +31,7 @@ impl Default for Person {
|
|
|
|
// 3. Extract the first element from the split operation and use it as the name
|
|
|
|
// 3. Extract the first element from the split operation and use it as the name
|
|
|
|
// 4. Extract the other element from the split operation and parse it into a `usize` as the age
|
|
|
|
// 4. Extract the other element from the split operation and parse it into a `usize` as the age
|
|
|
|
// If while parsing the age, something goes wrong, then return the default of Person
|
|
|
|
// If while parsing the age, something goes wrong, then return the default of Person
|
|
|
|
// Otherwise, then return an instantiated Person onject with the results
|
|
|
|
// Otherwise, then return an instantiated Person object with the results
|
|
|
|
impl From<&str> for Person {
|
|
|
|
impl From<&str> for Person {
|
|
|
|
fn from(s: &str) -> Person {
|
|
|
|
fn from(s: &str) -> Person {
|
|
|
|
}
|
|
|
|
}
|
|
|
|