Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMigrate `next_*` methods to return `Option` #70
Conversation
In the Rust standard library, the `next` method on the `Iterator` trait returns an `Option`. Prior to this commit, the `next` and `next_*` methods return `Err<_, ()>`. In an attempt to make some of the code more idiomatic, I migrated these methods to return `Option` instead.
|
Thanks for the good intentions, but using I’ve experimented with a generalized Until returning |
What do you mean by this? |
|
I mean that you can use this modified |
frewsxcv commentedMar 17, 2015
In the Rust standard library, the
nextmethod on theIteratortraitreturns an
Option. Prior to this commit, thenextandnext_*methods return
Err<_, ()>. In an attempt to make some of the code moreidiomatic, I migrated these methods to return
Optioninstead.