Skip to content

Commit d070863

Browse files
committed
update test output
1 parent 77015c2 commit d070863

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/ui/and_then_then_some.fixed

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ fn main() {
77

88
let _z = x.clone().filter(|v| v.starts_with('f'));
99
let _w = x.clone().filter(|v| v.starts_with('f'));
10-
#[allow(clippy::needless_return)]
11-
let _v = x.clone().filter(|v| v.starts_with('g'));
10+
#[allow(clippy::needless_return)]
11+
let _v = x.clone().filter(|v| v.starts_with('g'));
1212
}

tests/ui/and_then_then_some.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ LL | let _w = Option::and_then(x.clone(), |v: String| bool::then_some(v.star
2020
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::filter` instead: `x.clone().filter(|v| v.starts_with('f'))`
2121

2222
error: use of `Option::and_then` and `bool::then_some` is equivelent to `filter`
23-
--> tests/ui/and_then_then_some.rs:11:11
23+
--> tests/ui/and_then_then_some.rs:11:14
2424
|
2525
LL | let _v = x.clone().and_then(|v| return v.starts_with('g').then_some(v));
2626
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::filter` instead: `x.clone().filter(|v| v.starts_with('g'))`

0 commit comments

Comments
 (0)