Skip to content

Commit

Permalink
fix: fix bulk_overwrite_full_slice in nb and sync producer
Browse files Browse the repository at this point in the history
  • Loading branch information
Frando committed Aug 30, 2024
1 parent 9111a4c commit 5c595e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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 5c595e3

Please sign in to comment.