sortedvec icon indicating copy to clipboard operation
sortedvec copied to clipboard

Do automatic key conversion?

Open marcusklaas opened this issue 6 years ago • 1 comments

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.

marcusklaas avatar Jan 23 '19 13:01 marcusklaas

The data structure generated by sortedvec_slicekey! does this now, but lifetime issues currently block implementing this for sortedvec!..

marcusklaas avatar Apr 09 '19 11:04 marcusklaas