We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37e7058 commit 3b9bba4Copy full SHA for 3b9bba4
tests/ui/and_then_then_some.rs
@@ -3,10 +3,10 @@
3
fn main() {
4
let x = Some("foo".to_string());
5
6
- /*let _y = x.clone().and_then(|v| v.starts_with('f')
+ let _y = x.clone().and_then(|v| v.starts_with('f')
7
.then_some(v));
8
9
- let _z = x.clone().and_then(|v| bool::then_some(v.starts_with('f'), v));*/
+ let _z = x.clone().and_then(|v| bool::then_some(v.starts_with('f'), v));
10
let _w = Option::and_then(x, |v| {
11
bool::then_some(v.starts_with('f'), v)
12
});
0 commit comments