mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 07:04:18 +00:00
style: fix fmt
This commit is contained in:
parent
9d1f824878
commit
56580406b1
3 changed files with 7 additions and 11 deletions
|
@ -220,10 +220,8 @@ mod issue_11910 {
|
|||
}
|
||||
|
||||
struct Foo;
|
||||
impl Foo{
|
||||
fn bar(&self, _ : bool) {
|
||||
|
||||
}
|
||||
impl Foo {
|
||||
fn bar(&self, _: bool) {}
|
||||
}
|
||||
|
||||
fn test_then() {
|
||||
|
|
|
@ -226,10 +226,8 @@ mod issue_11910 {
|
|||
}
|
||||
|
||||
struct Foo;
|
||||
impl Foo{
|
||||
fn bar(&self, _ : bool) {
|
||||
|
||||
}
|
||||
impl Foo {
|
||||
fn bar(&self, _: bool) {}
|
||||
}
|
||||
|
||||
fn test_then() {
|
||||
|
|
|
@ -283,19 +283,19 @@ LL | let _ = v.iter().find(|fp| test_u32_2(*fp.field)).is_none();
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `!v.iter().any(|fp| test_u32_2(*fp.field))`
|
||||
|
||||
error: called `is_none()` after searching an `Iterator` with `find`
|
||||
--> $DIR/search_is_some_fixable_none.rs:237:9
|
||||
--> $DIR/search_is_some_fixable_none.rs:235:9
|
||||
|
|
||||
LL | v.iter().find(|x| **x == 42).is_none().then(computations);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `!_.any()` instead: `(!v.iter().any(|x| *x == 42))`
|
||||
|
||||
error: called `is_none()` after searching an `Iterator` with `find`
|
||||
--> $DIR/search_is_some_fixable_none.rs:242:9
|
||||
--> $DIR/search_is_some_fixable_none.rs:240:9
|
||||
|
|
||||
LL | v.iter().find(|x| **x == 42).is_none().then_some(0);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `!_.any()` instead: `(!v.iter().any(|x| *x == 42))`
|
||||
|
||||
error: called `is_none()` after searching an `Iterator` with `find`
|
||||
--> $DIR/search_is_some_fixable_none.rs:244:17
|
||||
--> $DIR/search_is_some_fixable_none.rs:242:17
|
||||
|
|
||||
LL | Foo.bar(v.iter().find(|x| **x == 42).is_none());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `!_.any()` instead: `!v.iter().any(|x| *x == 42)`
|
||||
|
|
Loading…
Reference in a new issue