So I feel like I'm missing something. I want to iterate over a Rust vector. It a...

@mcc@mastodon.social

So I feel like I'm missing something.

I want to iterate over a Rust vector. It appears the way to do that is to call thevec.iter().rev().

rev() reverses the iterator order, which for a vector iterator can be done efficiently.

However, I can imagine, somewhere in the world, a storage type where producing a reverse iterator is cheap but reversing an iterator already created is expensive. It seems, wouldn't that break with this design? Usually the Rust stdlib has thought things out more than me.