diff options
Diffstat (limited to 'src/libcoretest/str.rs')
| -rw-r--r-- | src/libcoretest/str.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcoretest/str.rs b/src/libcoretest/str.rs index 938755113b5..f2a1b0ac584 100644 --- a/src/libcoretest/str.rs +++ b/src/libcoretest/str.rs @@ -10,9 +10,9 @@ #[test] fn test_bool_from_str() { - assert_eq!("true".parse(), Some(true)); - assert_eq!("false".parse(), Some(false)); - assert_eq!("not even a boolean".parse::<bool>(), None); + assert_eq!("true".parse().ok(), Some(true)); + assert_eq!("false".parse().ok(), Some(false)); + assert_eq!("not even a boolean".parse::<bool>().ok(), None); } fn check_contains_all_substrings(s: &str) { |
