about summary refs log tree commit diff
path: root/clippy_lints/src/declared_lints.rs
diff options
context:
space:
mode:
authorQuinn Sinclair <me@partiallytyped.dev>2023-12-20 22:49:33 +0200
committerPartiallyTyped <me@partiallytyped.dev>2023-12-21 00:16:47 +0200
commit25b9ca3f64bd3f7fda96e50f340c9c3459fe2e0a (patch)
treec779751b0d70db11d48ebebb1e6713954622715d /clippy_lints/src/declared_lints.rs
parent7e650b761006b9dfb5b26a05c2f725a06e9cb14d (diff)
downloadrust-25b9ca3f64bd3f7fda96e50f340c9c3459fe2e0a.tar.gz
rust-25b9ca3f64bd3f7fda96e50f340c9c3459fe2e0a.zip
New lints `iter_filter_is_some` and `iter_filter_is_ok`
Adds a pair of lints that check for cases of an iterator over `Result`
and `Option` followed by `filter` without being followed by `map` as
that is covered already by a different, specialized lint.

changelog: New Lint: [`iter_filter_is_some`]
changelog: New Lint: [`iter_filter_is_ok`]
Diffstat (limited to 'clippy_lints/src/declared_lints.rs')
-rw-r--r--clippy_lints/src/declared_lints.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/clippy_lints/src/declared_lints.rs b/clippy_lints/src/declared_lints.rs
index 38fda36c58a..a00e2d3e044 100644
--- a/clippy_lints/src/declared_lints.rs
+++ b/clippy_lints/src/declared_lints.rs
@@ -369,6 +369,8 @@ pub(crate) static LINTS: &[&crate::LintInfo] = &[
     crate::methods::ITERATOR_STEP_BY_ZERO_INFO,
     crate::methods::ITER_CLONED_COLLECT_INFO,
     crate::methods::ITER_COUNT_INFO,
+    crate::methods::ITER_FILTER_IS_OK_INFO,
+    crate::methods::ITER_FILTER_IS_SOME_INFO,
     crate::methods::ITER_KV_MAP_INFO,
     crate::methods::ITER_NEXT_SLICE_INFO,
     crate::methods::ITER_NTH_INFO,