-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Show common iterators as impl Iterator
within nested types
#7647
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
Comments
This is similar to #3138, but with a concrete suggestion for iterators rather than "shorten all long types". |
We already do this shortening for hints for bare iterator types coming from |
Oh neat, I didn't realize you did. Yes, it would be great to extend it to nested types :) |
impl Iterator
impl Iterator
within nested types
This might be tricky to implement actually as currently we merely have to check if the type implements |
This seems to have been implemented at some point |
Ah, I tested nested iterators where this seems to work i.e |
"Common iterators" is intentionally in scare quotes because I don't want to bikeshed exactly what set that should be here. Basically the request is for things like
vec![0].into_iter().flat_map(|| ...)
to be shown asIterator<Item = i32>
instead ofFlatMap<IntoIter<i32>>
. As an example, this snippet:could instead be
|...| -> impl Iterator<Item = ConditionalPass>
.The text was updated successfully, but these errors were encountered: