Skip to content

Implement IntoIterator and use it for an example#468

Merged
matthiasgoergens merged 6 commits intomasterfrom
matthias/implement-iter
Nov 29, 2024
Merged

Implement IntoIterator and use it for an example#468
matthiasgoergens merged 6 commits intomasterfrom
matthias/implement-iter

Conversation

@matthiasgoergens
Copy link
Contributor

@matthiasgoergens matthiasgoergens commented Oct 27, 2024

There's lots more in the code where we can use this to simplify things later. But I want to keep the PR simple.

@matthiasgoergens
Copy link
Contributor Author

@lispc Here's another simple one that we can get into master.

@lispc
Copy link
Collaborator

lispc commented Nov 29, 2024

@lispc Here's another simple one that we can get into master.

I am neutral for this change. iter() does not seems so bad for me. Wait the original struct author to review.

@matthiasgoergens
Copy link
Contributor Author

I am neutral for this change. iter() does not seems so bad for me. Wait the original struct author to review.

I guess I need to make good on the promise in the PR description to show why this is a useful change:

There's lots more in the code where we can use this to simplify things later.

.iter() by itself isn't too bad, but implementing standard interfaces (that do the same thing) makes our tools more generally useful, because they work better with other functionality that works with standard interfaces.

Copy link
Collaborator

@lispc lispc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh i realized before it was a self-named-iter method.

@matthiasgoergens matthiasgoergens merged commit 998e933 into master Nov 29, 2024
@matthiasgoergens matthiasgoergens deleted the matthias/implement-iter branch November 29, 2024 08:58
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.

2 participants