Closed travis-leith closed 3 weeks ago
I think you can in fact do that, the methods for that are here (3 methods) https://docs.rs/indexmap/latest/indexmap/map/struct.IndexMap.html#method.get_index
No idea how I missed that. I will test it before closing. Thanks.
Right now I can either index keys or index values. I cannot (as far as I can tell) index (key, value) pairs.
I would like map[usize] -> (key, value).
The workaround is to convert my
IndexMap<Key, Value>
toIndexMap<Key, (Key, Value>>
which is not ideal.