This commit is contained in:
Mark
2024-02-05 18:34:57 -07:00
parent cbb422f69d
commit 614850ab1d
6 changed files with 40 additions and 59 deletions
+1 -1
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]);
}