Open
Description
A BTreeMap
version of the into_group*
function group would be a nice addition.
The idea is that sometimes working with Hash
is not feasible or even impossible, e.g. when you have to work with float-based datatypes as key or you would like to group your data by some custom criteria without wrapping the type and implementing custom Hash
.
The into_group_btreemap()
and into_group_btreemap_by()
functions should work similarly how into_group_map()
and into_group_btreemap_by()
work, but would require K: Ord + Eq
instead of K: Hash + Eq
and would return BTreeMap<K, Vec<V>>
instead of HashMap<K, Vec<V>>
.
I have the code patched into my codebase, so I can also start a PR is this feature is required.