Skip to content

Commit

Permalink
Fix collapsible_match clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdrz committed Aug 20, 2024
1 parent 9bd603e commit 93648e4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions bindgen/ir/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -940,13 +940,13 @@ impl Item {
// Only use local ids for enums, classes, structs and union types. All
// other items use their global ID.
let ty_kind = self.kind().as_type().map(|t| t.kind());
if let Some(ty_kind) = ty_kind {
match *ty_kind {
TypeKind::Comp(..) |
TypeKind::TemplateInstantiation(..) |
TypeKind::Enum(..) => return self.local_id(ctx).to_string(),
_ => {}
}
if let Some(
TypeKind::Comp(..) |
TypeKind::TemplateInstantiation(..) |
TypeKind::Enum(..),
) = ty_kind
{
return self.local_id(ctx).to_string();
}

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

0 comments on commit 93648e4

Please sign in to comment.