diff --git a/common/std-shims/src/io.rs b/common/std-shims/src/io.rs index ef98d1eb..4d33f135 100644 --- a/common/std-shims/src/io.rs +++ b/common/std-shims/src/io.rs @@ -53,7 +53,7 @@ mod shims { impl Read for &[u8] { fn read(&mut self, buf: &mut [u8]) -> Result { - let mut read = 0; + let mut read = buf.len(); if self.len() < buf.len() { read = self.len(); }