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
Is there some specific reason why you .rev() each half of the iterator separately?
Also, is there a way to get the other direction (oldest to newest) without having to .rev() the iterator each time it is used? Perhaps you could add an iterator like the following:
let (first_half, second_half) = self.data.split_at(self.insertion_index);
second_half.iter().chain(first_half.iter())
The text was updated successfully, but these errors were encountered:
Is there some specific reason why you .rev() each half of the iterator separately?
I suppose that part can be rewritten as b.iter().chain(a.iter()).rev(), yeah. Unfortunately, that would be a breaking change as I chose to use an explicitly specified type alias for the iterator type rather than a newtype (for no particular reason), so I think I'd rather avoid chaging it unless there's a good justification.
Also, is there a way to get the other direction (oldest to newest) without having to .rev() the iterator each time it is used? Perhaps you could add an iterator like the following:
let (first_half, second_half) = self.data.split_at(self.insertion_index);
second_half.iter().chain(first_half.iter())
Sure, that should work. The usual method could even be implemented in terms of this one, then, assuming a breaking change was made. But since I'd like no breaking changes, this could just be a separate method. Could you send a PR?
Is there some specific reason why you
.rev()
each half of the iterator separately?Also, is there a way to get the other direction (oldest to newest) without having to
.rev()
the iterator each time it is used? Perhaps you could add an iterator like the following:The text was updated successfully, but these errors were encountered: