clarify EOF error across stream types and predicates (#1867, #1870)

This commit is contained in:
Mark
2023-07-08 13:38:32 -06:00
parent 2e26f37f5e
commit 067b5998ee
11 changed files with 84 additions and 71 deletions

View File

@@ -117,8 +117,6 @@ impl<R: Read> CharReader<R> {
// Branch using `>=` instead of the more correct `==`
// to tell the compiler that the pos..cap slice is always valid.
if self.pos >= self.buf.len() {
debug_assert!(self.pos >= self.buf.len());
self.buf.clear();
let mut word = [0u8; std::mem::size_of::<char>()];