You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not opposed to this, but the implementation would require great care. The inherent methods on Segments all assume that the iterator only moves forward, so something would need to be done about this.
Existing Functionality
Currently there is only a forward iterator for
Segments
even though it is backed by a known size slice.https://github.com/SergioBenitez/Rocket/blob/f1f533c1e5b0df5b44877d7cca39fb0f596a21b6/core/http/src/uri/segments.rs#L279-L295
Suggested Changes
Add a
DoubleEndedIterator
implementation toSegments
to allow for iterating path segments in reverse for example, if be necessary.Alternatives Considered
Collecting into a Vec and iterating in reverse is inefficient and for-i is just ugly and doesn't give clean flexibility.
The text was updated successfully, but these errors were encountered: