Skip to content

Commit

Permalink
Merge pull request #62 from n0-computer/fix-bulk-overwrite-full
Browse files Browse the repository at this point in the history
fix: pass correct buffer in bulk_overwrite_full_slice
  • Loading branch information
AljoschaMeyer authored Aug 31, 2024
2 parents c2a1540 + 5c595e3 commit b404002
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ufotofu/src/local_nb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,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 {
Expand Down
2 changes: 1 addition & 1 deletion ufotofu/src/nb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion ufotofu/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b404002

Please sign in to comment.