Rollup merge of #137375 - steffahn:clarify-read_line-comment, r=Mark-Simulacrum
Minor internal comments fix for `BufRead::read_line` Just a little fix that came up while I was reading through this source code, and had to search for a few minutes to find out what was actually *meant* here.
This commit is contained in:
commit
f47c7e8564
1 changed files with 1 additions and 1 deletions
|
|
@ -2534,7 +2534,7 @@ pub trait BufRead: Read {
|
|||
fn read_line(&mut self, buf: &mut String) -> Result<usize> {
|
||||
// Note that we are not calling the `.read_until` method here, but
|
||||
// rather our hardcoded implementation. For more details as to why, see
|
||||
// the comments in `read_to_end`.
|
||||
// the comments in `default_read_to_string`.
|
||||
unsafe { append_to_string(buf, |b| read_until(self, b'\n', b)) }
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue