mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 12:36:35 +03:00
Fix newly detected lint issues
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -53,7 +53,7 @@ fn is_ident_too_short(&self, cx: &LateContext<'_>, str: &str, span: Span) -> boo
|
||||
&& 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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user