You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fill() method of BufferedReader does not fill the internal buffer, unless the buffer is completely empty. This does not match the description in the Buffer trait. One case where this can cause problems is when using read_char(), e.g.:
fnmain(){letmut s = "a".repeat(64*1024-1);
s.push_char('ß');let rdr = std::io::mem::MemReader::new(s.into_bytes());letmut rdr = std::io::buffered::BufferedReader::new(rdr);
rdr.fill();
rdr.consume(64*1024-2);println!("{}", rdr.read_char());// Some('a')println!("{}", rdr.read_char());// None, should be Some('ß')println!("{}", rdr.read_char());// None}
The text was updated successfully, but these errors were encountered:
The fill() method of BufferedReader does not fill the internal buffer, unless the buffer is completely empty. This does not match the description in the Buffer trait. One case where this can cause problems is when using read_char(), e.g.:
The text was updated successfully, but these errors were encountered: