Closed
Description
rust/library/std/src/io/mod.rs
Lines 1886 to 1926 in a55748f
The doc states thatfill_buf()
needs to be paired with consume()
to function properly, which can be comprehended to imply that if consume()
is not called immediately after fill_buf()
it would cause undefined behavior.
Also, it is said that later calling read
may return the same contents. It's confusing that may is used instead of will here, and this confuses the reader to a deeper level.