This commit is contained in:
Mark
2024-02-01 09:31:04 -07:00
parent cbb422f69d
commit 614850ab1d
6 changed files with 40 additions and 59 deletions

View File

@@ -229,7 +229,7 @@ impl<R: Read> CharRead for CharReader<R> {
match self.inner.read(word_slice) {
Err(e) => return Some(Err(e)),
Ok(nread) if nread == 0 => return Some(Err(bad_bytes_error(&self.buf))),
Ok(0) => return Some(Err(bad_bytes_error(&self.buf))),
Ok(nread) => {
self.buf.extend_from_slice(&word_slice[0..nread]);
}