indexmap icon indicating copy to clipboard operation
indexmap copied to clipboard

A hash table with consistent order and fast iteration; access items by key or sequence index

Results 35 indexmap issues
Sort by recently updated
recently updated
newest added

This is a multimap implementation using `IndexMap` and `IndexSet`. Would this be a good fit in this repository? If the answer.. - ..is yes, I will further improve `IndexMultimap` such...

I would like to use ```IndexMap``` as a ```BTreeMap``` with faster reads and slower writes. But calling ```sort_keys()``` after every ```insert()``` is pretty slow. Would it be possible to have...

This looks like a bug to me. I'd expect this test-case to pass: ```rust #[test] fn eq() { let m1: IndexMap = vec![(1, 1), (2, 2)].into_iter().collect(); let m2: IndexMap =...

Instead we can just use features. FYI: https://github.com/intellij-rust/intellij-rust/issues/4631

I made a small test script that adds and removes elements from an `IndexMap`: ```rust use indexmap::IndexMap; fn main() { let mut map = IndexMap::with_capacity(10); for i in 0..1000 {...

The standard library hashmap and btree map [recently got a nightly-only `try_insert` operation](https://github.com/rust-lang/rust/pull/82764) ([here's the tracking issue](https://github.com/rust-lang/rust/issues/82766)), which makes it very convenient to insert something into a map, panicking in...

waiting-for-std

I have a need to periodically shuffle my `IndexSet`s. Currently I built this by iterating, collecting to a vec, shuffling, iterating, collecting back into an `IndexSet`. Is there a better...

I would like to be able to insert an element at a particular index in the indexmap (knowning full well, that this will cause `O(n)` move operations).

enhancement

The function `get_index_mut` gives a mutable reference to the of an entry, but does not update the corresponding hash. This means you can write buggy code like this: ```rust use...

Have `retain` return a iterator over the extracted values, similar to `Drain` in the standard library, or my [PreRFC](https://internals.rust-lang.org/t/pre-rfc-retain-iterators-api-for-hashset-hashmap-vec-vecdeque/4164/4). It seems like a relatively simple change, so if you're interested...

enhancement