I am wondering what is the most efficient or idiomatic way to drop a range of elements from the front of a VecDeque and keep the last N elements?
I see that truncate() drops elements nice and cleanly from the back but what is the equivalent to doing this at the front?
It looks like I could use drain(), split_off() or retain().
From reading the documentation drain involves some iteration and yields the removed items (I want to discard these).
Retain looks useful for "cherry-picking" which elements to keep that might not be contiguous in memory.
Since I am not aware of any equivalent to truncate for removing a range of elements from the front, I suspect that split_off() might be the most efficient way to do this?
I'll experiment with the various methods but perhaps someone in will have a definitive, best known answer.