add comment in expand_strip()

This commit is contained in:
Tomáš Král committed 2021-05-18 18:31:17 +02:00
1 parent b7c4f668ae
commit 4dc7c2a986
1 file changed
+3
+3
View File
@@ -1136,7 +1136,10 @@ impl<R: Read + Seek> Decoder<R> {
DecodingBuffer::F64(buf) => bytecast::f64_as_ne_mut_bytes(buf), DecodingBuffer::F64(buf) => bytecast::f64_as_ne_mut_bytes(buf),
}; };
// Note that writing updates the slice to point to the yet unwritten part.
std::io::copy(&mut reader.take(buffer.len() as u64), &mut buffer)?; std::io::copy(&mut reader.take(buffer.len() as u64), &mut buffer)?;
// If less than the expected amount of bytes was read, set the remaining data to 0.
for b in buffer { for b in buffer {
*b = 0; *b = 0;
} }