use matches!() macro in more places
This commit is contained in:
parent
3cd3bbecc5
commit
0a5640b55f
21 changed files with 49 additions and 86 deletions
|
@ -94,10 +94,9 @@ impl CoverageSpan {
|
|||
stmt_index: usize,
|
||||
) -> Self {
|
||||
let is_closure = match statement.kind {
|
||||
StatementKind::Assign(box (_, Rvalue::Aggregate(box ref kind, _))) => match kind {
|
||||
AggregateKind::Closure(_, _) | AggregateKind::Generator(_, _, _) => true,
|
||||
_ => false,
|
||||
},
|
||||
StatementKind::Assign(box (_, Rvalue::Aggregate(box ref kind, _))) => {
|
||||
matches!(kind, AggregateKind::Closure(_, _) | AggregateKind::Generator(_, _, _))
|
||||
}
|
||||
_ => false,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue