Skip to content

Commit

Permalink
fix(io,copy): clear buf after write (#325)
Browse files Browse the repository at this point in the history
  • Loading branch information
Berrysoft authored Nov 5, 2024
1 parent 1c42922 commit 8b20318
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compio-io/src/util/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ pub async fn copy<R: AsyncRead, W: AsyncWrite>(reader: &mut R, writer: &mut W) -
let res;
(res, buf) = writer.write_all(buf).await.into();
res?;
buf.clear();
}

Ok(total)
Expand Down

0 comments on commit 8b20318

Please sign in to comment.