-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Show type for docs slice Chunks #77938
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
Conversation
r? @sfackler (rust_highfive has picked a reviewer for you, use r? to override) |
Thanks! r=me once CI pass |
@bors: r+ rollup |
📌 Commit f18d4ff has been approved by |
On second-thought, I think it kinda deserves the original purpose which is "how do I get this type". I'll let others decide. @bors: r- |
I feel like this should have libs or doc come to a bigger decision about examples on all the adapter types. Most of them just point to the method on If this PR is desirable, it seems like that would imply that there should also be ones for |
@GuillaumeGomez I did mentioned these last time, I thought we started adding examples for structs? @scottmcm Yes, the link to the original function is still there, I initially don't agree with this when I saw @GuillaumeGomez sending how to create the struct, but then I found @jyn514 sending suggestion on giving explicit type to the struct. Then I find it useful, since now we know the explicit struct type without digging much given the examples, like |
I think this is better than before - maybe not by a lot, but it makes it more clear what the types are. Iterators are pretty 'magic' when you're new to the language and I think this makes them less mysterious.
Sure, that sounds good to me ;) |
That wasn't my complain. They should have examples. My point was just that maybe there was too much information. Is it really necessary to add type information? |
I find it good such that they can easily understand the additional type system rather than going to read generics and understand it, concrete types certainly is easier to comprehend. |
Triage: It seems this is waiting on team decision? Let me mark it as such. |
@GuillaumeGomez Similar patch #78776 |
Doc team but I think they are busy. |
There is no doc team. The best reviewer for this is probably someone from T-libs. |
Agreed with what @scottmcm said. None of the other iterator adapters have examples in the type documentation. The example on this type doesn't really add anything over the link to slice::chunks. The slice::chunks documentation already clearly shows the signature including |
Should I just close this? |
Triage: |
I will close this. |
No description provided.