mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
Replace single-branch match with if let
This commit is contained in:
@@ -478,10 +478,7 @@ impl Visitor<'_> {
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
node_types::FieldTypeInfo::Multiple {
|
||||
types,
|
||||
..
|
||||
} => {
|
||||
node_types::FieldTypeInfo::Multiple { types, .. } => {
|
||||
return self.type_matches_set(tp, types);
|
||||
}
|
||||
}
|
||||
@@ -493,13 +490,10 @@ impl Visitor<'_> {
|
||||
return true;
|
||||
}
|
||||
for other in types.iter() {
|
||||
match &self.schema.get(other).unwrap().kind {
|
||||
EntryKind::Union { members } => {
|
||||
if self.type_matches_set(tp, members) {
|
||||
return true;
|
||||
}
|
||||
if let EntryKind::Union { members } = &self.schema.get(other).unwrap().kind {
|
||||
if self.type_matches_set(tp, members) {
|
||||
return true;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
false
|
||||
|
||||
Reference in New Issue
Block a user