Skip to content

Commit 0bdc4de

Browse files
author
J. Cliff Dyer
committed
fixup: More idiomatic map
1 parent 725adba commit 0bdc4de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ir/enum_ty.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl Enum {
7272

7373
declaration.visit(|cursor| {
7474
let val = if is_signed {
75-
cursor.enum_val_signed().map(|val| EnumVariantValue::Signed(val))
75+
cursor.enum_val_signed().map(EnumVariantValue::Signed)
7676
} else {
7777
if cursor.kind() == CXCursor_EnumConstantDecl {
7878
Some(EnumVariantValue::Unsigned(cursor.enum_val_unsigned()))
@@ -84,7 +84,7 @@ impl Enum {
8484
let name = cursor.spelling();
8585
let comment = cursor.raw_comment();
8686
variants.push(EnumVariant::new(name, comment, val));
87-
};
87+
}
8888
CXChildVisit_Continue
8989
});
9090

0 commit comments

Comments
 (0)