diff --git a/ufotofu/src/nb.rs b/ufotofu/src/nb.rs index c792c2f..6cd3e94 100644 --- a/ufotofu/src/nb.rs +++ b/ufotofu/src/nb.rs @@ -423,7 +423,7 @@ where let mut produced_so_far = 0; while produced_so_far < buf.len() { - match self.bulk_produce(buf).await { + match self.bulk_produce(&mut buf[produced_so_far..]).await { Ok(Left(count)) => produced_so_far += count, Ok(Right(fin)) => { return Err(OverwriteFullSliceError { diff --git a/ufotofu/src/sync.rs b/ufotofu/src/sync.rs index 0fede11..19ca01e 100644 --- a/ufotofu/src/sync.rs +++ b/ufotofu/src/sync.rs @@ -385,7 +385,7 @@ where let mut produced_so_far = 0; while produced_so_far < buf.len() { - match self.bulk_produce(buf) { + match self.bulk_produce(&mut buf[produced_so_far..]) { Ok(Left(count)) => produced_so_far += count, Ok(Right(fin)) => { return Err(OverwriteFullSliceError {