This commit is contained in:
Moritz Moeller 2022-02-25 11:36:59 +01:00
commit 8ec9d8bd31
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;