Skip to content

Commit

Permalink
chore: shrink the capacity of the matches vector even further
Browse files Browse the repository at this point in the history
  • Loading branch information
plusvic committed May 1, 2024
1 parent 03504d1 commit af34adc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/scanner/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ impl<'r> Scanner<'r> {
// would be too high.
for (_, matches) in ctx.unconfirmed_matches.iter_mut() {
matches.clear();
matches.shrink_to(512);
matches.shrink_to(32);
}

// If some pattern or rule matched, clear the matches. Notice that a
Expand All @@ -715,7 +715,7 @@ impl<'r> Scanner<'r> {
{
for (_, matches) in ctx.pattern_matches.iter_mut() {
matches.clear();
matches.shrink_to(512);
matches.shrink_to(32);
}

ctx.non_private_matching_rules.clear();
Expand Down

0 comments on commit af34adc

Please sign in to comment.