Skip to content

clarify BufRead::{fill_buf, consume} docs - #136177

Merged
bors merged 2 commits into
rust-lang:masterfrom
hkBst:patch-24
Mar 19, 2025
Merged

clarify BufRead::{fill_buf, consume} docs#136177
bors merged 2 commits into
rust-lang:masterfrom
hkBst:patch-24

Conversation

@hkBst

Copy link
Copy Markdown
Member

Fixes#85394

@rustbot

Copy link
Copy Markdown
Collaborator

r? @ibraheemdev

rustbot has assigned @ibraheemdev.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 28, 2025
@rust-log-analyzer

This comment has been minimized.

@ibraheemdevibraheemdev left a comment

Copy link
Copy Markdown
Member

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.

Comment threadlibrary/std/src/io/mod.rs Outdated
Comment threadlibrary/std/src/io/mod.rs Outdated
Comment threadlibrary/std/src/io/mod.rs Outdated
Comment threadlibrary/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.

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
MemberAuthor

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"?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, that works.

Comment threadlibrary/std/src/io/mod.rs
Comment threadlibrary/std/src/io/mod.rs Outdated
@rustbotrustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 11, 2025
@hkBst

hkBst commented Mar 2, 2025

Copy link
Copy Markdown
MemberAuthor

@rustbot ready

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 2, 2025

@ibraheemdevibraheemdev left a comment

Copy link
Copy Markdown
Member

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.

Comment threadlibrary/std/src/io/mod.rs Outdated
Comment threadlibrary/std/src/io/mod.rs Outdated
Comment threadlibrary/std/src/io/mod.rs Outdated
Comment threadlibrary/std/src/io/mod.rs Outdated
Comment threadlibrary/std/src/io/mod.rs Outdated
Comment threadlibrary/std/src/io/mod.rs Outdated
Comment threadlibrary/std/src/io/mod.rs Outdated
@rustbotrustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 17, 2025
Co-authored-by: Ibraheem Ahmed <ibraheem@ibraheem.ca>
@hkBst

hkBst commented Mar 18, 2025

Copy link
Copy Markdown
MemberAuthor

I like the changes here, just a couple of nits.

Thanks, I applied your suggested changes.

@rustbot ready

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 18, 2025
@ibraheemdev

Copy link
Copy Markdown
Member

Perfect, thanks! @bors r+ rollup

@bors

bors commented Mar 18, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit e5b86e2 has been approved by ibraheemdev

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 18, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 19, 2025
…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
@bors
bors merged commit b52275f into rust-lang:masterMar 19, 2025
@rustbotrustbot added this to the 1.87.0 milestone Mar 19, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 19, 2025
Rollup merge of rust-lang#136177 - hkBst:patch-24, r=ibraheemdev
clarify BufRead::{fill_buf, consume} docs
Fixesrust-lang#85394
@hkBst
hkBst deleted the patch-24 branch March 20, 2025 06:57
github-actionsBot pushed a commit to model-checking/verify-rust-std that referenced this pull request Apr 2, 2025
github-actionsBot pushed a commit to model-checking/verify-rust-std that referenced this pull request Apr 2, 2025
…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
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-libsRelevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation for BufRead is confusing

5 participants

@hkBst@rustbot@rust-log-analyzer@ibraheemdev@bors