-
Notifications
You must be signed in to change notification settings - Fork 13.4k
clarify BufRead::{fill_buf, consume} docs #136177
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
r? @ibraheemdev rustbot has assigned @ibraheemdev. Use |
This comment has been minimized.
This comment has been minimized.
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.
I like the primary change here, but unsure about some of the other changes.
library/std/src/io/mod.rs
Outdated
/// | ||
/// [`consume`]: BufRead::consume | ||
/// | ||
/// An empty buffer returned indicates that the stream has reached EOF. | ||
/// Returns an empty buffer to indicate that the stream has reached EOF. |
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.
This is a specific return condition, the new wording makes it sound like it always returns an empty buffer.
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.
I see your point. Perhaps "to indicate that" => "when"?
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.
Sure, that works.
@rustbot ready |
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.
I like the changes here, just a couple of nits.
Co-authored-by: Ibraheem Ahmed <ibraheem@ibraheem.ca>
Thanks, I applied your suggested changes. @rustbot ready |
Perfect, thanks! @bors r+ rollup |
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#136177 (clarify BufRead::{fill_buf, consume} docs) - rust-lang#138654 (Remove the regex dependency from coretests) - rust-lang#138655 (rustc-dev-guide sync) - rust-lang#138656 (Remove double nesting in post-merge workflow) - rust-lang#138658 (CI: mirror alpine and centos images to ghcr) - rust-lang#138659 (coverage: Don't store a body span in `FunctionCoverageInfo`) - rust-lang#138661 (Revert: Add *_value methods to proc_macro lib) - rust-lang#138670 (Remove existing AFIDT implementation) - rust-lang#138674 (Various codegen_llvm cleanups) - rust-lang#138684 (use then in docs for `fuse` to enhance readability) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#136177 - hkBst:patch-24, r=ibraheemdev clarify BufRead::{fill_buf, consume} docs Fixes rust-lang#85394
clarify BufRead::{fill_buf, consume} docs Fixes rust-lang#85394
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#136177 (clarify BufRead::{fill_buf, consume} docs) - rust-lang#138654 (Remove the regex dependency from coretests) - rust-lang#138655 (rustc-dev-guide sync) - rust-lang#138656 (Remove double nesting in post-merge workflow) - rust-lang#138658 (CI: mirror alpine and centos images to ghcr) - rust-lang#138659 (coverage: Don't store a body span in `FunctionCoverageInfo`) - rust-lang#138661 (Revert: Add *_value methods to proc_macro lib) - rust-lang#138670 (Remove existing AFIDT implementation) - rust-lang#138674 (Various codegen_llvm cleanups) - rust-lang#138684 (use then in docs for `fuse` to enhance readability) r? `@ghost` `@rustbot` modify labels: rollup
Fixes #85394