Closed
Description
Let's use this issue to discuss changes for a hypothetical 2.0.
Proposed
- Increase the MSRV from 1.18.
- This is not strictly breaking, as we did state the intent to allow increases in minor releases, but in 2.0 we can do this without any fear of harming our dependents.
- In particular,
serde_json
supports Rust 1.31.
- In particular,
- Implement index-sliced key-value iterators #104 wants 1.28 for
RangeBounds
. - Switch to hashbrown's RawTable internally #131 wants 1.32 for
hashbrown
. - 1.34 adds
TryFrom
/TryInto
which may be useful for custom indexing. - With 1.36, we could assume
alloc
support. - DONE: We went ahead with MSRV 1.32 in
indexmap
1.5, and MSRV 1.36 in 1.6
- This is not strictly breaking, as we did state the intent to allow increases in minor releases, but in 2.0 we can do this without any fear of harming our dependents.
- Change the default hasher to something faster.
- e.g.
hashbrown
defaults toahash
. - Especially with MSRV 1.36, a
no_std
default would be nice. - We can wrap it to avoid committing to a specific public dependency.
- e.g.
- Parameterize the index type.
- While we could try to default
Idx = usize
, this doesn't always work well with type inference.
- While we could try to default
- Maybe change the default
remove()
?- (bluss) I still think the current decision is fine, no change from my end for 2.0. (Good way to document this would be to say that "remove is the fastest way to remove an element, and if order should be preserved, ...")
-
std
crate feature - Consider ordered
PartialEq + Eq
, more likeVec
thanHashMap
(IndexMap / IndexSet comparison isn't order-aware. #153, map: Make Eq comparisons ordering-aware. #154).- This would also allow
PartialOrd
,Ord
, andHash
.
- This would also allow
-
get_index_mut
should return&K
instead of&mut K
(Add more Vec/slice-like methods to maps and sets #160 (comment))