style: fix fmt

This commit is contained in:
Yuxiang Qiu 2024-01-04 20:34:38 -05:00
parent 9d1f824878
commit 56580406b1
No known key found for this signature in database
3 changed files with 7 additions and 11 deletions

View file

@ -220,10 +220,8 @@ mod issue_11910 {
}
struct Foo;
impl Foo{
fn bar(&self, _ : bool) {
}
impl Foo {
fn bar(&self, _: bool) {}
}
fn test_then() {

View file

@ -226,10 +226,8 @@ mod issue_11910 {
}
struct Foo;
impl Foo{
fn bar(&self, _ : bool) {
}
impl Foo {
fn bar(&self, _: bool) {}
}
fn test_then() {

View file

@ -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)`