-
Notifications
You must be signed in to change notification settings - Fork 310
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
Different types in FoldWhile #259
Comments
Marking as breaking-change so that it is not forgotten at a breaking change-point. |
Note that std |
Yeah, that seems like it would do exactly what I want. It does feel a little dirty to use |
I agree -- core uses an enum very much like FoldWhile internally to make things clearer: https://github.com/rust-lang/rust/blob/master/src/libcore/iter/mod.rs#L356-L404 |
Currently, FoldWhile requires the same type in
Continue
andDone
, but it doesn't seem obvious why it shouldn't be able to use two different types.It might be possible to add in a backwards compatible way, for example by adding the second type as a type parameter defaulting to the first type parameter.
The text was updated successfully, but these errors were encountered: