compactmap 0.3.6

Compact Vec-based map that choses assigns IDs for your values on it's own. Very similar to Slab.
Documentation

Compactmap - Vec-based map that uses usize as key type and maintains internal linked list for removed nodes.

You don't choose the key when inserting a new value. You can remove any entry.

Based on this post by eddyb.

The function and structure of CompactMap is almost the same as Slab apart from missing cached length and more features. If I knew about Slab earlier, CompactMap wouldn't have appeared.

TODO:

  • More thorough tests
  • Entry (is it really needed?)

License is MIT or Apache, like for Rust itself.