-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
cordyceps: make cursor interface (mostly) match std
#227
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 18, 2022
This adds `peek_next` and `peek_prev` methods to `cordyceps::list::Cursor`, similar to the methods on `std::collections::linked_list::Cursor`. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 18, 2022
This adds a `Cursor::remove_current` method, similar to the one on `std::collections::linked_list::CursorMut`. I also reimplemented `remove_first` to use this. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 18, 2022
Signed-off-by: Eliza Weisman <[email protected]>
hawkw
force-pushed
the
eliza/good-cursors
branch
from
June 18, 2022 20:06
6160ffb
to
070633b
Compare
This adds `Cursor::current` and `Cursor::current_mut` methods, similar to the ones on `std::collections::linked_list::CursorMut`. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
This adds `peek_next` and `peek_prev` methods to `cordyceps::list::Cursor`, similar to the methods on `std::collections::linked_list::Cursor`. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
This adds a `Cursor::remove_current` method, similar to the one on `std::collections::linked_list::CursorMut`. I also reimplemented `remove_first` to use this. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
This adds a `Cursor::remove_current` method, similar to the one on `std::collections::linked_list::CursorMut`. I also reimplemented `remove_first` to use this. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
This renames `List::cursor` to `List::cursor_front_mut` to prepare for adding a `List::cursor_back_mut` and `cursor_front`/`cursor_back`, similarly to `std::collections::LinkedList`'s cursor methods. `List::cursor` is now deprecated. Signed-off-by: Eliza Weisman <[email protected]>
This adds `List::cursor_back_mut` returning a mutable cursor at the back of the list. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
This adds a `Cursor::index` method to match the one on `std::collections::linked_list::CursorMut`. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
This adds `Cursor::insert_before` and `Cursor::insert_after` methods to match the ones on `std::collections::linked_list::CursorMut`. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
hawkw
force-pushed
the
eliza/good-cursors
branch
from
June 18, 2022 20:10
070633b
to
3a8e20b
Compare
Signed-off-by: Eliza Weisman <[email protected]>
hawkw
force-pushed
the
eliza/good-cursors
branch
from
June 18, 2022 20:10
3a8e20b
to
8f5a2df
Compare
This replaces the use of `cordyceps::List::cursor` with `cordyceps::List::cursor_front_mut`.
hawkw
added a commit
that referenced
this pull request
Jun 18, 2022
Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 18, 2022
This adds `Cursor::current` and `Cursor::current_mut` methods, similar to the ones on `std::collections::linked_list::CursorMut`. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 18, 2022
This adds `peek_next` and `peek_prev` methods to `cordyceps::list::Cursor`, similar to the methods on `std::collections::linked_list::Cursor`. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 18, 2022
This adds a `Cursor::remove_current` method, similar to the one on `std::collections::linked_list::CursorMut`. I also reimplemented `remove_first` to use this. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 18, 2022
This adds a `Cursor::remove_current` method, similar to the one on `std::collections::linked_list::CursorMut`. I also reimplemented `remove_first` to use this. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 18, 2022
Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 18, 2022
This renames `List::cursor` to `List::cursor_front_mut` to prepare for adding a `List::cursor_back_mut` and `cursor_front`/`cursor_back`, similarly to `std::collections::LinkedList`'s cursor methods. `List::cursor` is now deprecated. Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 18, 2022
This adds `List::cursor_back_mut` returning a mutable cursor at the back of the list. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 18, 2022
This adds a `Cursor::index` method to match the one on `std::collections::linked_list::CursorMut`. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 18, 2022
This adds `Cursor::insert_before` and `Cursor::insert_after` methods to match the ones on `std::collections::linked_list::CursorMut`. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 18, 2022
Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 18, 2022
This renames `List::cursor` to `List::cursor_front_mut` to prepare for adding a `List::cursor_back_mut` and `cursor_front`/`cursor_back`, similarly to `std::collections::LinkedList`'s cursor methods. DEPRECATED: `List::cursor`, renamed to `List::cursor_front_mut`. Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 18, 2022
This adds `List::cursor_back_mut` returning a mutable cursor at the back of the list. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 18, 2022
This adds a `Cursor::index` method to match the one on `std::collections::linked_list::CursorMut`. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 18, 2022
This adds `Cursor::insert_before` and `Cursor::insert_after` methods to match the ones on `std::collections::linked_list::CursorMut`. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 18, 2022
Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 18, 2022
This replaces the use of `cordyceps::List::cursor` with `cordyceps::List::cursor_front_mut`.
hawkw
added a commit
that referenced
this pull request
Jun 21, 2022
This renames `List::cursor` to `List::cursor_front_mut` to prepare for adding a `List::cursor_back_mut` and `cursor_front`/`cursor_back`, similarly to `std::collections::LinkedList`'s cursor methods. Deprecates `List::cursor`. DEPRECATED: `List::cursor`, renamed to `List::cursor_front_mut`. Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 21, 2022
This adds `List::cursor_back_mut` returning a mutable cursor at the back of the list. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 21, 2022
This adds a `Cursor::index` method to match the one on `std::collections::linked_list::CursorMut`. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 21, 2022
This adds `Cursor::insert_before` and `Cursor::insert_after` methods to match the ones on `std::collections::linked_list::CursorMut`. Closes #224 Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 21, 2022
Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Jun 21, 2022
This replaces the use of `cordyceps::List::cursor` with `cordyceps::List::cursor_front_mut`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements most of the
std::collections::linked_list::Cursor
, with the following exceptions:CursorMut::splice_
methods because I want to implement those separatelyCursorMut::to_cursor
methods because we only have aCursorMut
type (and adding aCursor
type would be breaking, because it would require renamingCursor
)