It's really unfortunate that BTreeMap
doesn't have a drain
method that takes a RangeBounds
- the only real alternative I have right now is to iterate over all the keys in drain_filter
testing if they're in the range - taking what could ostensibly be an O(log(n)) operation and turning it into an O(n).
As someone who hasn't contributed to rust in the past - is there anything I can do to help make this happen? Do I need to submit an RFC?