Skip to content

Commit 93648e4

Browse files
committed
Fix collapsible_match clippy warning
1 parent 9bd603e commit 93648e4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

bindgen/ir/item.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -940,13 +940,13 @@ impl Item {
940940
// Only use local ids for enums, classes, structs and union types. All
941941
// other items use their global ID.
942942
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-
}
943+
if let Some(
944+
TypeKind::Comp(..) |
945+
TypeKind::TemplateInstantiation(..) |
946+
TypeKind::Enum(..),
947+
) = ty_kind
948+
{
949+
return self.local_id(ctx).to_string();
950950
}
951951

952952
// Note that this `id_` prefix prevents (really unlikely) collisions

0 commit comments

Comments
 (0)