We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
collapsible_match
1 parent 9bd603e commit 93648e4Copy full SHA for 93648e4
bindgen/ir/item.rs
@@ -940,13 +940,13 @@ impl Item {
940
// Only use local ids for enums, classes, structs and union types. All
941
// other items use their global ID.
942
let ty_kind = self.kind().as_type().map(|t| t.kind());
943
- if let Some(ty_kind) = ty_kind {
944
- match *ty_kind {
945
- TypeKind::Comp(..) |
946
- TypeKind::TemplateInstantiation(..) |
947
- TypeKind::Enum(..) => return self.local_id(ctx).to_string(),
948
- _ => {}
949
- }
+ if let Some(
+ TypeKind::Comp(..) |
+ TypeKind::TemplateInstantiation(..) |
+ TypeKind::Enum(..),
+ ) = ty_kind
+ {
+ return self.local_id(ctx).to_string();
950
}
951
952
// Note that this `id_` prefix prevents (really unlikely) collisions
0 commit comments