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:
Matthias Krüger 2025-03-02 22:44:23 +01:00 committed by GitHub
commit f47c7e8564
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)) }
}