]> git.lizzy.rs Git - rust.git/commitdiff
update lints
authorOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>
Tue, 21 Jun 2016 11:32:34 +0000 (13:32 +0200)
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>
Tue, 21 Jun 2016 11:32:34 +0000 (13:32 +0200)
CHANGELOG.md
README.md
clippy_lints/src/lib.rs

index 3c2f9e1a622e8e7a08b32a393cfed2896cc014a8..cbbd5497c7939211441042851060618f3b3588d3 100644 (file)
@@ -154,6 +154,9 @@ All notable changes to this project will be documented in this file.
 [`explicit_counter_loop`]: https://github.com/Manishearth/rust-clippy/wiki#explicit_counter_loop
 [`explicit_iter_loop`]: https://github.com/Manishearth/rust-clippy/wiki#explicit_iter_loop
 [`extend_from_slice`]: https://github.com/Manishearth/rust-clippy/wiki#extend_from_slice
+[`filter_flat_map`]: https://github.com/Manishearth/rust-clippy/wiki#filter_flat_map
+[`filter_map`]: https://github.com/Manishearth/rust-clippy/wiki#filter_map
+[`filter_map_flat_map`]: https://github.com/Manishearth/rust-clippy/wiki#filter_map_flat_map
 [`filter_next`]: https://github.com/Manishearth/rust-clippy/wiki#filter_next
 [`float_arithmetic`]: https://github.com/Manishearth/rust-clippy/wiki#float_arithmetic
 [`float_cmp`]: https://github.com/Manishearth/rust-clippy/wiki#float_cmp
index f410ff990d9cde98175eb07a42fc41280b7650c7..8f9d47f6ee99f68ad5a31ad94eeacbe32affac09 100644 (file)
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ Table of contents:
 
 ## Lints
 
-There are 154 lints included in this crate:
+There are 157 lints included in this crate:
 
 name                                                                                                                 | default | meaning
 ---------------------------------------------------------------------------------------------------------------------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -60,6 +60,9 @@ 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_flat_map](https://github.com/Manishearth/rust-clippy/wiki#filter_flat_map)                                   | allow   | using `filter(_).flat_map(_)`, which can be rewritten using just the flat_map
+[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_flat_map](https://github.com/Manishearth/rust-clippy/wiki#filter_map_flat_map)                           | allow   | using `filter_map(_).flat_map(_)`, which can be rewritten using just the flat_map
 [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)
index b68596f253558350363c8f93c8482c9284764363..a10ab8add0cd08efc6f718d0ec8c806af367871b 100644 (file)
@@ -268,6 +268,9 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
         items_after_statements::ITEMS_AFTER_STATEMENTS,
         matches::SINGLE_MATCH_ELSE,
         mem_forget::MEM_FORGET,
+        methods::FILTER_FLAT_MAP,
+        methods::FILTER_MAP,
+        methods::FILTER_MAP_FLAT_MAP,
         methods::OPTION_UNWRAP_USED,
         methods::RESULT_UNWRAP_USED,
         methods::WRONG_PUB_SELF_CONVENTION,