mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-28 11:17:26 +03:00
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:
@@ -2534,7 +2534,7 @@ fn skip_until(&mut self, byte: u8) -> Result<usize> {
|
||||
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)) }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user