-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Clarify non-exact length in the Iterator::take documentation #83272
Conversation
r? @dtolnay (rust-highfive has picked a reviewer for you, use r? to override) |
I don’t feel like this is as accurate as it could be. It only says that “fewer” than Also the first line summary no longer indicates that a prefix is returned. Maybe something like
We could also update
to something like
If you haven’t noticed by now, I enjoy being precise. I’m not sure if my versions aren’t potentially confusing or too lengthy, so some feedback would be appreciated. Edit: This part
might be better as an example, also I do acknowledge that working on |
I've added the extended explanation. Injected "(up to)" looks jarring to me, so I've avoided it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@bors r+ rollup |
📌 Commit 6cfdc38 has been approved by |
Rollup of 7 pull requests Successful merges: - rust-lang#82374 (Add license metadata for std dependencies) - rust-lang#82683 (Document panicking cases for integer division and remainder) - rust-lang#83272 (Clarify non-exact length in the Iterator::take documentation) - rust-lang#83338 (Fix test for rust-lang#82270) - rust-lang#83351 (post-drop-elab check-const: explain why we still check qualifs) - rust-lang#83367 (Improve error message for unassigned query provider) - rust-lang#83372 (SplitInclusive is public API) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
There's an example which demonstrates incomplete length case, but it'd be best to explain it right from the start.