sortedvec
sortedvec copied to clipboard
Do automatic key conversion?
Getting the exact right key type might be burdensome in some cases, e.g. when we expect a &str and a &String is passed. Can we accept K: AsRef<$key> or K: Borrow<$key> instead?
Played with this very briefly and wasn't able to find a general solution instantly, but this should be worth exploring further.
The data structure generated by sortedvec_slicekey! does this now, but lifetime issues currently block implementing this for sortedvec!..