Skip to content

Commit af34adc

Browse files
committed
chore: shrink the capacity of the matches vector even further
1 parent 03504d1 commit af34adc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/scanner/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ impl<'r> Scanner<'r> {
702702
// would be too high.
703703
for (_, matches) in ctx.unconfirmed_matches.iter_mut() {
704704
matches.clear();
705-
matches.shrink_to(512);
705+
matches.shrink_to(32);
706706
}
707707

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

721721
ctx.non_private_matching_rules.clear();

0 commit comments

Comments
 (0)