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

Fix BufRead::read_until documentation. #36851

Merged
merged 1 commit into from Sep 30, 2016
Merged

Fix BufRead::read_until documentation. #36851

merged 1 commit into from Sep 30, 2016

Conversation

ghost
Copy link

@ghost ghost commented Sep 30, 2016

Second paragraph already fully explains what happens when EOF is
encountered. The third paragraph (removed one) is spurious and
misleading.

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@@ -1270,10 +1270,6 @@ pub trait BufRead: Read {
/// delimiter or EOF is found. Once found, all bytes up to, and including,
/// the delimiter (if found) will be appended to `buf`.
///
/// If this reader is currently at EOF then this function will not modify
/// `buf` and will return `Ok(n)` where `n` is the number of bytes which
/// were read.
Copy link
Member

Choose a reason for hiding this comment

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

Yes this is confusingly written, but it's the only place where the Ok return is mentioned, can we thus keep some kind of explanation of what the return value Ok(n) means for this method?

Copy link
Author

Choose a reason for hiding this comment

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

Added some actual description of successful return value, and done similar
change to read_line.

@bluss
Copy link
Member

bluss commented Sep 30, 2016

@bors r+ rollup

Thanks

@bors
Copy link
Contributor

bors commented Sep 30, 2016

📌 Commit 1e8f692 has been approved by bluss

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Sep 30, 2016
Fix BufRead::read_until documentation.

Second paragraph already fully explains what happens when EOF is
encountered. The third paragraph (removed one) is spurious and
misleading.
bors added a commit that referenced this pull request Sep 30, 2016
Rollup of 13 pull requests

- Successful merges: #36529, #36535, #36576, #36623, #36711, #36750, #36810, #36829, #36833, #36841, #36842, #36851, #36860
- Failed merges:
@bors bors merged commit 1e8f692 into rust-lang:master Sep 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants