use all instead of join

This commit is contained in:
kyoto7250 2022-06-26 16:11:04 +09:00
parent bf317a83cf
commit d827b834d9

View file

@ -214,7 +214,7 @@ fn check_variant(cx: &LateContext<'_>, threshold: u64, def: &EnumDef<'_>, item_n
#[must_use]
fn have_no_extra_prefix(prefixes: &[&str]) -> bool {
prefixes.is_empty() || prefixes.join("") == "_"
prefixes.iter().all(|p| p == &"" || p == &"_")
}
#[must_use]