Also rename the lint in test files
This commit is contained in:
parent
ce63f3ae4d
commit
08d2a0d6b2
@ -11,7 +11,7 @@
|
|||||||
)]
|
)]
|
||||||
#![warn(
|
#![warn(
|
||||||
clippy::redundant_closure,
|
clippy::redundant_closure,
|
||||||
clippy::redundant_closures_for_method_calls,
|
clippy::redundant_closure_for_method_calls,
|
||||||
clippy::needless_borrow
|
clippy::needless_borrow
|
||||||
)]
|
)]
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
)]
|
)]
|
||||||
#![warn(
|
#![warn(
|
||||||
clippy::redundant_closure,
|
clippy::redundant_closure,
|
||||||
clippy::redundant_closures_for_method_calls,
|
clippy::redundant_closure_for_method_calls,
|
||||||
clippy::needless_borrow
|
clippy::needless_borrow
|
||||||
)]
|
)]
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ error: redundant closure found
|
|||||||
LL | let e = Some(TestStruct { some_ref: &i }).map(|a| a.foo());
|
LL | let e = Some(TestStruct { some_ref: &i }).map(|a| a.foo());
|
||||||
| ^^^^^^^^^^^ help: remove closure as shown: `TestStruct::foo`
|
| ^^^^^^^^^^^ help: remove closure as shown: `TestStruct::foo`
|
||||||
|
|
|
|
||||||
= note: `-D clippy::redundant-closures-for-method-calls` implied by `-D warnings`
|
= note: `-D clippy::redundant-closure-for-method-calls` implied by `-D warnings`
|
||||||
|
|
||||||
error: redundant closure found
|
error: redundant closure found
|
||||||
--> $DIR/eta.rs:77:51
|
--> $DIR/eta.rs:77:51
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#![allow(clippy::iter_cloned_collect)]
|
#![allow(clippy::iter_cloned_collect)]
|
||||||
#![allow(clippy::clone_on_copy)]
|
#![allow(clippy::clone_on_copy)]
|
||||||
#![allow(clippy::missing_docs_in_private_items)]
|
#![allow(clippy::missing_docs_in_private_items)]
|
||||||
#![allow(clippy::redundant_closures_for_method_calls)]
|
#![allow(clippy::redundant_closure_for_method_calls)]
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let _: Vec<i8> = vec![5_i8; 6].iter().copied().collect();
|
let _: Vec<i8> = vec![5_i8; 6].iter().copied().collect();
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#![allow(clippy::iter_cloned_collect)]
|
#![allow(clippy::iter_cloned_collect)]
|
||||||
#![allow(clippy::clone_on_copy)]
|
#![allow(clippy::clone_on_copy)]
|
||||||
#![allow(clippy::missing_docs_in_private_items)]
|
#![allow(clippy::missing_docs_in_private_items)]
|
||||||
#![allow(clippy::redundant_closures_for_method_calls)]
|
#![allow(clippy::redundant_closure_for_method_calls)]
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let _: Vec<i8> = vec![5_i8; 6].iter().map(|x| *x).collect();
|
let _: Vec<i8> = vec![5_i8; 6].iter().map(|x| *x).collect();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user