diff --git a/exercises/23_conversions/from_into.rs b/exercises/23_conversions/from_into.rs index 60911f3..da1a9a5 100644 --- a/exercises/23_conversions/from_into.rs +++ b/exercises/23_conversions/from_into.rs @@ -43,8 +43,7 @@ impl Default for Person { // I AM NOT DONE impl From<&str> for Person { - fn from(s: &str) -> Person { - } + fn from(s: &str) -> Person {} } fn main() { @@ -127,14 +126,14 @@ mod tests { #[test] fn test_trailing_comma() { let p: Person = Person::from("Mike,32,"); - assert_eq!(p.name, "Mike"); - assert_eq!(p.age, 32); + assert_eq!(p.name, "John"); + assert_eq!(p.age, 30); } #[test] fn test_trailing_comma_and_some_string() { - let p: Person = Person::from("Mike,32,man"); - assert_eq!(p.name, "Mike"); - assert_eq!(p.age, 32); + let p: Person = Person::from("Mike,32,dog"); + assert_eq!(p.name, "John"); + assert_eq!(p.age, 30); } }