We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7d33aa8 commit fd38ff6Copy full SHA for fd38ff6
src/libcore/tests/bool.rs
@@ -1,7 +1,7 @@
1
#[test]
2
fn test_bool_to_option() {
3
- assert_eq!(false.then(0), None);
4
- assert_eq!(true.then(0), Some(0));
5
- assert_eq!(false.then_with(|| 0), None);
6
- assert_eq!(true.then_with(|| 0), Some(0));
+ assert_eq!(false.to_option(0), None);
+ assert_eq!(true.to_option(0), Some(0));
+ assert_eq!(false.to_option_with(|| 0), None);
+ assert_eq!(true.to_option_with(|| 0), Some(0));
7
}
0 commit comments