Skip to content

Commit

Permalink
fix: named enum try_from impl
Browse files Browse the repository at this point in the history
  • Loading branch information
NexRX committed Mar 22, 2024
1 parent cf8985b commit 81566e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/logic/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ impl FieldsArg {
(Fields(f), Fields(ref b)) => f
.into_iter()
.filter(|v| !b.contains(v))
.chain(b.clone().into_iter())
.chain(b.clone())
.collect(),
(Fields(f), Omit(b)) => f.into_iter().filter(|v| !b.contains(v)).collect(),
(Omit(f), Fields(b)) => b.into_iter().filter(|v| !f.contains(v)).collect(),
Expand Down
2 changes: 1 addition & 1 deletion src/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ fn impl_for_enum(data: &DataEnum, field_mapping: &mut Vec<TokenStream>, field_ma
#name::#field_name{#(#variant_args),*} => #original_name::#field_name{#(#variant_args),*}
});
field_mapping_reverse.push(quote!{
#original_name::#field_name(#(#variant_args),*) => #name::#field_name(#(#variant_args),*)
#original_name::#field_name{#(#variant_args),*} => #name::#field_name{#(#variant_args),*}
});
},
};
Expand Down

0 comments on commit 81566e2

Please sign in to comment.