Skip to content

Commit 69e5677

Browse files
committed
cover most edge cases
1 parent 368c795 commit 69e5677

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/ui/and_then_then_some.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
fn main() {
44
let x = Some("foo".to_string());
55

6-
/*let _y = x.clone().and_then(|v| v.starts_with('f')
6+
let _y = x.clone().and_then(|v| v.starts_with('f')
77
.then_some(v));
88

9-
let _z = x.clone().and_then(|v| bool::then_some(v.starts_with('f'), v));*/
9+
let _z = x.clone().and_then(|v| bool::then_some(v.starts_with('f'), v));
1010
let _w = Option::and_then(x, |v| {
1111
bool::then_some(v.starts_with('f'), v)
1212
});

0 commit comments

Comments
 (0)