Skip to content

Commit

Permalink
Fix TrackedVec::drop
Browse files Browse the repository at this point in the history
Need to shrink by capacity, not by len.
  • Loading branch information
theduke committed May 24, 2023
1 parent 7c92025 commit 1c2a4b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/virtual-fs/src/limiter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ mod tracked_vec {
impl Drop for TrackedVec {
fn drop(&mut self) {
if let Some(limiter) = &self.limiter {
limiter.on_shrink(self.data.len());
limiter.on_shrink(self.data.capacity());
}
}
}
Expand Down

0 comments on commit 1c2a4b0

Please sign in to comment.