Skip to content

Commit

Permalink
Update uniffi_bindgen/src/interface/enum_.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Jan-Erik Rediger <jrediger@mozilla.com>
  • Loading branch information
rfk and badboy authored Aug 9, 2021
1 parent b0c2ddb commit 718571f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uniffi_bindgen/src/interface/enum_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ impl APIConverter<Enum> for &syn::ItemEnum {
.iter()
.map(|v| v.convert(ci))
.collect::<Result<Vec<_>>>()?;
let flat = !variants.iter().any(|v| !v.fields().is_empty());
let flat = variants.iter().all(|v| v.fields().is_empty());
Ok(Enum {
name: self.ident.to_string(),
variants,
Expand Down

0 comments on commit 718571f

Please sign in to comment.