Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shrink_to_fit does not shrink the internal IndexMap #50

Closed
Zannick opened this issue Jan 12, 2024 · 0 comments
Closed

shrink_to_fit does not shrink the internal IndexMap #50

Zannick opened this issue Jan 12, 2024 · 0 comments

Comments

@Zannick
Copy link

Zannick commented Jan 12, 2024

priority-queue/src/store.rs

Lines 192 to 198 in 2bfbf45

/// Shrinks the capacity of the internal data structures
/// that support this operation as much as possible.
#[inline(always)]
pub fn shrink_to_fit(&mut self) {
self.heap.shrink_to_fit();
self.qp.shrink_to_fit();
}

But this appears to be supported by indexmap: https://docs.rs/indexmap/latest/indexmap/map/struct.IndexMap.html#method.shrink_to_fit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants