Use Vec::extend
, instead of calling Vec::push
in a loop
This commit is contained in:
parent
3d29b68077
commit
b0fd642de6
@ -443,9 +443,7 @@ pub(super) fn column_count(&self) -> Option<usize> {
|
||||
/// expands it.
|
||||
fn push(&mut self, row: PatStack<'p, 'tcx>) {
|
||||
if !row.is_empty() && row.head().is_or_pat() {
|
||||
for row in row.expand_or_pat() {
|
||||
self.patterns.push(row);
|
||||
}
|
||||
self.patterns.extend(row.expand_or_pat());
|
||||
} else {
|
||||
self.patterns.push(row);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user