Skip to content

Commit 73ed6a5

Browse files
committed
Auto merge of #6855 - ehuss:clippy-redundant_closure, r=nrc
Ignore Clippy redundant_closure I think sometimes the closure is easier to read. Compare ```rust x.map(|s| s.to_string()) ``` vs ```rust x.map(std::string::ToString::to_string) ``` I think it is also easier to modify when it is a closure. However, I don't feel strongly about it, so if anyone wants the Clippy form, I'm fine with switching things over to that.
2 parents f43a29d + f818762 commit 73ed6a5

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/cargo/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#![allow(clippy::identity_op)] // used for vertical alignment
1111
#![allow(clippy::implicit_hasher)] // large project
1212
#![allow(clippy::large_enum_variant)] // large project
13+
#![allow(clippy::redundant_closure)] // closures can be less verbose
1314
#![allow(clippy::redundant_closure_call)] // closures over try catch blocks
1415
#![allow(clippy::too_many_arguments)] // large project
1516
#![allow(clippy::type_complexity)] // there's an exceptionally complex type

tests/testsuite/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
33
#![allow(clippy::blacklisted_name)]
44
#![allow(clippy::explicit_iter_loop)]
5+
#![allow(clippy::redundant_closure)]
56
#![warn(clippy::needless_borrow)]
67
#![warn(clippy::redundant_clone)]
78

0 commit comments

Comments
 (0)