about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-02-20 17:58:23 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2024-02-21 19:32:08 +0100
commit635acb6804ac5e944ca86375c05c262c582163e7 (patch)
tree4f68433864bad73e93ec07eb2079a1efed2372d2
parentd28146133cfc11d9dfe6a082881c7242061275dc (diff)
Fix newly detected lint issues
-rw-r--r--clippy_config/src/conf.rs2
-rw-r--r--clippy_lints/src/min_ident_chars.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/clippy_config/src/conf.rs b/clippy_config/src/conf.rs
index 6a1d7cb852a..b781259ad96 100644
--- a/clippy_config/src/conf.rs
+++ b/clippy_config/src/conf.rs
@@ -648,7 +648,7 @@ fn deserialize(file: &SourceFile) -> TryConf {
             extend_vec_if_indicator_present(&mut conf.conf.doc_valid_idents, DEFAULT_DOC_VALID_IDENTS);
             extend_vec_if_indicator_present(&mut conf.conf.disallowed_names, DEFAULT_DISALLOWED_NAMES);
             // TODO: THIS SHOULD BE TESTED, this comment will be gone soon
-            if conf.conf.allowed_idents_below_min_chars.contains(&"..".to_owned()) {
+            if conf.conf.allowed_idents_below_min_chars.contains("..") {
                 conf.conf
                     .allowed_idents_below_min_chars
                     .extend(DEFAULT_ALLOWED_IDENTS_BELOW_MIN_CHARS.iter().map(ToString::to_string));
diff --git a/clippy_lints/src/min_ident_chars.rs b/clippy_lints/src/min_ident_chars.rs
index ec07f283c46..31bc59fe940 100644
--- a/clippy_lints/src/min_ident_chars.rs
+++ b/clippy_lints/src/min_ident_chars.rs
@@ -53,7 +53,7 @@ impl MinIdentChars {
             && str.len() <= self.min_ident_chars_threshold as usize
             && !str.starts_with('_')
             && !str.is_empty()
-            && self.allowed_idents_below_min_chars.get(&str.to_owned()).is_none()
+            && !self.allowed_idents_below_min_chars.contains(str)
     }
 }