1
0
Fork 0
mirror of https://github.com/notohh/rustlings.git synced 2025-01-09 00:58:08 -05:00

Merge pull request from barlevalon/from_into_tests_fix

fix(conversions/from_into.rs): test_trailing_comma() and test_trailing_comma_and_some_string()
This commit is contained in:
liv 2023-08-07 17:38:37 +02:00 committed by GitHub
commit b64aa9993b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,14 +127,14 @@ mod tests {
#[test]
fn test_trailing_comma() {
let p: Person = Person::from("Mike,32,");
assert_eq!(p.name, "John");
assert_eq!(p.age, 30);
assert_eq!(p.name, "Mike");
assert_eq!(p.age, 32);
}
#[test]
fn test_trailing_comma_and_some_string() {
let p: Person = Person::from("Mike,32,man");
assert_eq!(p.name, "John");
assert_eq!(p.age, 30);
assert_eq!(p.name, "Mike");
assert_eq!(p.age, 32);
}
}