Skip to content

Commit

Permalink
📝 remove unnecessary reserve
Browse files Browse the repository at this point in the history
  • Loading branch information
Xudong-Huang committed Mar 1, 2024
1 parent 26b0f8f commit c324118
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/conetty/queued_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ impl<W: Write> BufWriter<W> {
fn write_all(&mut self) -> std::io::Result<()> {
let ret = self.writer.write_all(&self.buf);
self.buf.clear();
let capacity = self.buf.capacity();
self.buf.reserve(capacity);
ret
}
}
Expand Down

0 comments on commit c324118

Please sign in to comment.