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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ExactSize and DoubleEnded impls to GridRow and Col Iter #52

Merged
merged 4 commits into from
May 15, 2024

Conversation

luca3s
Copy link
Contributor

@luca3s luca3s commented May 14, 2024

I wrote implementations of ExactSizeIterator and DoubleEndedIterator for GridRowIter and GridColIter.

  • adds one usize of additional memory usage to both types
  • makes both more versatile and maybe even faster (e.g. when collecting into a vec ExactSizeIterator should reduce the needed allocations)

The changes to Iterator are bigger than actually needed, but now the next and next_back functions look very similar.
Iterator still passes all test. I also added tests for all new code.

Maybe closes #38, which i just notices while writing this.

@becheran becheran merged commit 9ca3415 into becheran:master May 15, 2024
3 checks passed
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.

Add ability to get slice of row.
2 participants