bimap-rs icon indicating copy to clipboard operation
bimap-rs copied to clipboard

impl DoubleEndedIterator for IntoIter

Open Skarlett opened this issue 3 years ago • 1 comments

I noticed that DoubleEndedIterator could be implemented for the internal IntoIter structure. This would add on methods such as rev() next_back()

I'll likely make a fork with the appropriate modifications, and open up a pull request if all looks good to you.

Also, could you note somewhere in the documentation if ordering is preserved during iteration, thanks.

Skarlett avatar Jun 03 '22 15:06 Skarlett

Yes, I'd be happy to review a pull request with those changes. The iteration order is preserved for BiBTreeMap but not for BiHashMap. I can make a note of that in the module documentation.

billyrieger avatar Jun 06 '22 03:06 billyrieger

@Skarlett did you get around to open that PR? I'm currently trying to use the *_range methods to find the next neighbor, which also only works into the increasing direction.

flokli avatar May 26 '23 22:05 flokli

@Skarlett did you get around to open that PR? I'm currently trying to use the *_range methods to find the next neighbor, which also only works into the increasing direction.

Ah, sorry. I've been busy under a new umbrella and haven't gotten to writing it.

Skarlett avatar May 26 '23 22:05 Skarlett

Isn't it already implemented? https://github.com/billyrieger/bimap-rs/blob/3dca651620845a939ee9e5393c0a8fe9fe0a1656/src/btree.rs#L735

GrigorenkoPV avatar May 27 '23 23:05 GrigorenkoPV

Yes, you were right. Sorry for the noise. Looks like this issue can be closed.

flokli avatar May 29 '23 13:05 flokli