about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRyan Sullivant <rsulli55@gmail.com>2020-10-05 21:23:36 -0700
committerRyan Sullivant <rsulli55@gmail.com>2020-11-10 23:18:47 -0700
commita1cf2d334d685fa11fdc96fc98f35292254e5651 (patch)
treec5ffdfa657ebb5101b594882a88b5748b482811a /src
parentc4fc076e11b7125d481ee96df6d2e0c4ed493356 (diff)
downloadrust-a1cf2d334d685fa11fdc96fc98f35292254e5651.tar.gz
rust-a1cf2d334d685fa11fdc96fc98f35292254e5651.zip
Added a lint as suggested in 6010 which recommends using `contains()`
instead of `find()` follows by `is_some()` on strings

Update clippy_lints/src/find_is_some_on_strs.rs
Co-authored-by: Takayuki Nakata <f.seasons017@gmail.com>

Update clippy_lints/src/methods/mod.rs
Co-authored-by: Philipp Krones <hello@philkrones.com>
Diffstat (limited to 'src')
-rw-r--r--src/lintlist/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lintlist/mod.rs b/src/lintlist/mod.rs
index 4f1b56ed9be..69acd3d9b8b 100644
--- a/src/lintlist/mod.rs
+++ b/src/lintlist/mod.rs
@@ -2121,7 +2121,7 @@ vec![
     Lint {
         name: "search_is_some",
         group: "complexity",
-        desc: "using an iterator search followed by `is_some()`, which is more succinctly expressed as a call to `any()`",
+        desc: "using an iterator or string search followed by `is_some()`, which is more succinctly expressed as a call to `any()` or `contains()`",
         deprecation: None,
         module: "methods",
     },