From 262148c946187dd69e2d875360c45fc4cbd9becf Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Wed, 22 Jun 2016 13:03:59 +0200 Subject: [PATCH] update lint doc text --- README.md | 2 +- clippy_lints/src/methods.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4345c5048..d210a1b21 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/clippy_lints/src/methods.rs b/clippy_lints/src/methods.rs index 97130ee75..950a03159 100644 --- a/clippy_lints/src/methods.rs +++ b/clippy_lints/src/methods.rs @@ -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