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

EventReader should implement Iterator #76

Closed
frewsxcv opened this issue Feb 26, 2015 · 3 comments
Closed

EventReader should implement Iterator #76

frewsxcv opened this issue Feb 26, 2015 · 3 comments

Comments

@frewsxcv
Copy link
Contributor

It already implements next(), why not make it implement Iterator?

@frewsxcv
Copy link
Contributor Author

I just noticed there's an events() method on EventReader which implements Iterator. Why not just implement Iterator directly on EventReader?

@gkoz
Copy link
Contributor

gkoz commented Mar 26, 2015

There's also IntoIterator trait to consider.

@netvl
Copy link
Owner

netvl commented Sep 30, 2015

EventReader now implements IntoIterator, so it can be used in a for loop. You can also get EventReader back from its iterator with into_inner().

@netvl netvl closed this as completed Sep 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants