rust-clippy
rust-clippy copied to clipboard
A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/
Closes rust-lang/rust-clippy#15072 changelog: [`redundant_closure`] fix wrong suggestions with deref overload
Based on rust-lang/rust-clippy#14702 This should generally be a perf improvement. The old implementation allocated a lot of things and then did multiple passes over the data. This only does a...
changelog: [`std_wildcard_imports`]: Initial implementation This fixes rust-lang/rust-clippy#13961. Please let me know if there any missing test cases and/or changes! ## TODO - [x] Fix failed tests from other lints -...
Add option to allow `eq_op` lint to check function calls too. changelog: [`eq_op`]: allow optionally check fn calls too fixes: #13827 TODO: cleanup test
Closes rust-lang/rust-clippy#15004 The lint will note `the end suggestion probably needs some adjustments to use the expression result correctly` when the expr's is not unit. So I extend this note...
Closes rust-lang/rust-clippy#14924 changelog: [`unused_trait_names`] fix FP when `as` name is from macro input
Suggest replacing `assert!(a == b)` with `assert_eq!(a, b)`. This is useful, because given the environment `let a = 1`, `let b = 2`, the displayed error changes between: * `assert!(a...
blocked on rust-lang/rust-clippy#15073 Lint method calls inside `map_or` too, so for this, lint will be showed: ```rust Some(4).map_or("asd".to_string().len() as i32, f); ``` previously it worked only for: ```rust Some(4).map_or(slow_fun(), f);...
build on top of rust-lang/rust-clippy#15071 This also adds ability to lint Option/Result::and method. Yes, this is not `or` method, but uses the same eager/lazy linting logic. Should i update lint...