fix(clippy): 1.59.0 clippy fix

This commit is contained in:
Kat Marchán 2022-02-24 21:07:10 -08:00
parent 50bcec909a
commit fa5b5fee54
No known key found for this signature in database
GPG Key ID: AEB529C08A3C7E9E
1 changed files with 1 additions and 2 deletions

View File

@ -48,13 +48,12 @@ pub(crate) fn gen_all_variants_with(
) -> Option<TokenStream> {
let pairs = variants
.iter()
.map(|def| {
.filter_map(|def| {
def.args
.forward_or_override_enum(&def.ident, which_fn, |concrete| {
f(&def.ident, &def.fields, concrete)
})
})
.flatten()
.collect::<Vec<_>>();
if pairs.is_empty() {
return None;