You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, If I use a closure to pass something to a function using the Deref trait clippy tries to suggest to remove the closure but that doesn't compile.
Suggestion:
warning: redundant closure found
--> src/lib.rs:5:22
|
5 | addrs.iter().map(|a| a.to_string()).collect()
| ^^^^^^^^^^^^^^^^^ help: remove closure as shown: `ToString::to_string`
|
= note: #[warn(clippy::redundant_closure)] on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
Hi, If I use a closure to pass something to a function using the
Deref
trait clippy tries to suggest to remove the closure but that doesn't compile.Suggestion:
Code before: https://play.rust-lang.org/?gist=67e025045af6f7989d554b2084f57d13
Code after applying the suggestion(doesn't compile): https://play.rust-lang.org/?gist=83ed70c09362c87cfe584e4744513a11
The text was updated successfully, but these errors were encountered: