-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Beef up BufRead::consume docs #23622
Conversation
r? @pcwalton (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -558,6 +558,10 @@ pub trait BufRead: Read { | |||
/// This function does not perform any I/O, it simply informs this object | |||
/// that some amount of its buffer, returned from `fill_buf`, has been | |||
/// consumed and should no longer be returned. | |||
/// | |||
/// This function is used to tell the buffer how many bytes you've consumed from the return | |||
/// value of `fill_buff`, and so may do odd things if `fill_buf` isn't called before calling |
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.
buff
also there's no mention that the number of bytes passed to |
@oli-obk thanks! fixed. That naming convention is something I have yet to internalize, ugh. |
/// | ||
/// This function is used to tell the buffer how many bytes you've consumed from the return | ||
/// value of `fill_buf`, and so may do odd things if `fill_buf` isn't called before calling | ||
/// this. |
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.
Can this follow the surrounding style of wrapping to 80 characters? Other than that r=me
@bors: r=alexcrichton rollup |
📌 Commit a5e1cbe has been approved by |
- Successful merges: rust-lang#22954, rust-lang#23119, rust-lang#23509, rust-lang#23561, rust-lang#23590, rust-lang#23607, rust-lang#23608, rust-lang#23618, rust-lang#23622, rust-lang#23639, rust-lang#23641 - Failed merges: rust-lang#23401
Fixes #23196