Skip to content
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

Add BufReader::buffer #49139

Merged
merged 1 commit into from
Mar 20, 2018
Merged

Add BufReader::buffer #49139

merged 1 commit into from
Mar 20, 2018

Conversation

sfackler
Copy link
Member

This subsumes the need for an explicit is_empty function, and provides
access to the buffered data itself which has been requested from time to
time.

We could call this buf to match fill_buf, but I think I'd prefer fill_buffer anyways in hindsight.

@kennytm kennytm added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 18, 2018
@abonander
Copy link
Contributor

get_buf() has been suggested before.

@sfackler
Copy link
Member Author

We don't use get_ for accessors generally (get_ref and get_mut being the exceptions I can think of).

@SimonSapin
Copy link
Contributor

Looks good to me, but the doctest fails: https://travis-ci.org/rust-lang/rust/builds/355046740#L2943

This subsumes the need for an explicit is_empty function, and provides
access to the buffered data itself which has been requested from time to
time.
@sfackler
Copy link
Member Author

Fixed

@SimonSapin
Copy link
Contributor

SimonSapin commented Mar 19, 2018

@bors: r+

@bors
Copy link
Contributor

bors commented Mar 19, 2018

📌 Commit 16da5d4 has been approved by SimonSapin

@bors bors 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 19, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Mar 19, 2018
…apin

Add BufReader::buffer

This subsumes the need for an explicit is_empty function, and provides
access to the buffered data itself which has been requested from time to
time.

We could call this `buf` to match `fill_buf`, but I think I'd prefer `fill_buffer` anyways in hindsight.
bors added a commit that referenced this pull request Mar 20, 2018
Rollup of 17 pull requests

- Successful merges: #46518, #48810, #48834, #48902, #49004, #49092, #49096, #49099, #49104, #49125, #49139, #49152, #49157, #49161, #49166, #49176, #49184
- Failed merges:
@bors bors merged commit 16da5d4 into rust-lang:master Mar 20, 2018
@sfackler sfackler deleted the bufreader-buffer branch March 31, 2018 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants