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

Implement IntoIterator for Events #682

Closed
dtolnay opened this Issue Aug 19, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@dtolnay
Copy link

dtolnay commented Aug 19, 2017

The standard library typically implements IntoIterator<Item = T> for Collection<T> and IntoIterator<Item = &T> for &Collection<T>. In mio, Events has the second but not the first.

The owned iterator can be more convenient in some situations, like putting into a struct.

struct Bad {
    events: mio::Events,
    iter: mio::event::Iter<'??>,
}

struct Good {
    iter: mio::event::IntoIter,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.