std-shims: six Read for &[u8]

This commit is contained in:
Boog900 2023-07-03 00:35:31 +01:00 committed by Luke Parker
parent d928b787f7
commit 30834fe4d2

View file

@ -53,7 +53,7 @@ mod shims {
impl Read for &[u8] {
fn read(&mut self, buf: &mut [u8]) -> Result<usize> {
let mut read = 0;
let mut read = buf.len();
if self.len() < buf.len() {
read = self.len();
}