Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cordyceps): add ExactSizeIterator, IterMut #208

Merged
merged 3 commits into from
Jun 7, 2022
Merged

Conversation

hawkw
Copy link
Owner

@hawkw hawkw commented Jun 7, 2022

No description provided.

@hawkw hawkw changed the title feat(cordyceps): add DoubleEndedIter and ExactSizeIter feat(cordyceps): add ExactSizeIterator, IterMut Jun 7, 2022
hawkw added 2 commits June 7, 2022 09:49
This commit adds an `ExactSizeIterator` implementation for the
`list::Iter` type.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
It doesn't really make sense to add a `DoubleEndedIterator` for the
`Cursor` type, because the cursor cannot iterate from the end of the
list --- it has a *single* position in the list. Similarly, it can't
actually be `ExactSizeIterator`, because it may remove entries while
iterating.

This commit adds a new `IterMut` for just iterating mutably.
hawkw added a commit that referenced this pull request Jun 7, 2022
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
@hawkw hawkw enabled auto-merge (rebase) June 7, 2022 16:50
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
@hawkw hawkw merged commit 1e95127 into main Jun 7, 2022
@hawkw hawkw deleted the eliza/actual-size branch June 7, 2022 16:59
hawkw added a commit that referenced this pull request Jun 7, 2022
This commit adds an `ExactSizeIterator` implementation for the
`list::Iter` type.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
hawkw added a commit that referenced this pull request Jun 7, 2022
It doesn't really make sense to add a `DoubleEndedIterator` for the
`Cursor` type, because the cursor cannot iterate from the end of the
list --- it has a *single* position in the list. Similarly, it can't
actually be `ExactSizeIterator`, because it may remove entries while
iterating.

This commit adds a new `IterMut` for just iterating mutably.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant