Skip to content

shrink_to_fit does not shrink the internal IndexMap #50

Closed
@Zannick

Description

@Zannick

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions