Skip to content

Commit d827b83

Browse files
committed
use all instead of join
1 parent bf317a8 commit d827b83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/enum_variants.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ fn check_variant(cx: &LateContext<'_>, threshold: u64, def: &EnumDef<'_>, item_n
214214

215215
#[must_use]
216216
fn have_no_extra_prefix(prefixes: &[&str]) -> bool {
217-
prefixes.is_empty() || prefixes.join("") == "_"
217+
prefixes.iter().all(|p| p == &"" || p == &"_")
218218
}
219219

220220
#[must_use]

0 commit comments

Comments
 (0)