mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-26 14:40:32 +00:00
update lint doc text
This commit is contained in:
parent
5ccbf3d437
commit
262148c946
2 changed files with 2 additions and 2 deletions
|
@ -60,7 +60,7 @@ name
|
|||
[explicit_counter_loop](https://github.com/Manishearth/rust-clippy/wiki#explicit_counter_loop) | warn | for-looping with an explicit counter when `_.enumerate()` would do
|
||||
[explicit_iter_loop](https://github.com/Manishearth/rust-clippy/wiki#explicit_iter_loop) | warn | for-looping over `_.iter()` or `_.iter_mut()` when `&_` or `&mut _` would do
|
||||
[extend_from_slice](https://github.com/Manishearth/rust-clippy/wiki#extend_from_slice) | warn | `.extend_from_slice(_)` is a faster way to extend a Vec by a slice
|
||||
[filter_map](https://github.com/Manishearth/rust-clippy/wiki#filter_map) | allow | using `filter(_).map(_)`, which is more succinctly expressed as `.filter_map(_)`
|
||||
[filter_map](https://github.com/Manishearth/rust-clippy/wiki#filter_map) | allow | using combinations of `filter`, `map`, `filter_map` and `flat_map` which can usually be written as a single method call
|
||||
[filter_next](https://github.com/Manishearth/rust-clippy/wiki#filter_next) | warn | using `filter(p).next()`, which is more succinctly expressed as `.find(p)`
|
||||
[float_arithmetic](https://github.com/Manishearth/rust-clippy/wiki#float_arithmetic) | allow | Any floating-point arithmetic statement
|
||||
[float_cmp](https://github.com/Manishearth/rust-clippy/wiki#float_cmp) | warn | using `==` or `!=` on float values (as floating-point operations usually involve rounding errors, it is always better to check for approximate equality within small bounds)
|
||||
|
|
|
@ -168,7 +168,7 @@ declare_lint! {
|
|||
/// **Example:** `iter.filter(|x| x == 0).map(|x| x * 2)`
|
||||
declare_lint! {
|
||||
pub FILTER_MAP, Allow,
|
||||
"using `filter(_).map(_)`, which is more succinctly expressed as `.filter_map(_)`"
|
||||
"using combinations of `filter`, `map`, `filter_map` and `flat_map` which can usually be written as a single method call"
|
||||
}
|
||||
|
||||
/// **What it does:** This lint `Warn`s on an iterator search (such as `find()`, `position()`, or
|
||||
|
|
Loading…
Reference in a new issue