-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking issue for extra linked list methods #27794
Comments
This is basically a lame version of cursors, which is what we should use instead imo. It's not 1:1 though -- this api lets you have all the elements yielded at once. Classic iterator tradeoff. |
Triage: these are still unstable. |
There are some ideas for a more complete |
|
I'm going to echo @gankro's thoughts:
An iterator conceptually represents a (double-ended) range of elements. The only operation that it supports is popping an element off the end of that range. A cursor on the other hand represents a position in a collection, and can be moved backwards or forwards in the collection. The cursor can be used to insert or remove an element at any given position in the collection. I strongly oppose adding insertion/deleting methods to As I mentioned in the linked thread, a design based on the |
Since we now have cursors, I think these methods should be removed. |
Remove `linked_list_extras` methods. Removing these in favor of the `Cursor` API in rust-lang#58533 . Closes rust-lang#27794. r? @Amanieu
Reopening since we only deprecated the methods instead of removing them. I'd say give it about 2 weeks then remove them. |
This is a tracking issue for the unstable
linked_list_extras
methods in the standard library.cc @gankro, perhaps you can fill this in some more? The specific methods in question are:
IterMut::insert_next
IterMut::peek_next
The text was updated successfully, but these errors were encountered: