Skip to content

Commit

Permalink
fix: clippy (rapiz1#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
rapiz1 authored Nov 3, 2023
1 parent ebb764a commit 84c04ab
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ impl UdpTraffic {
}

pub async fn read<T: AsyncRead + Unpin>(reader: &mut T, hdr_len: u8) -> Result<UdpTraffic> {
let mut buf = Vec::new();
buf.resize(hdr_len as usize, 0);
let mut buf = vec![0; hdr_len as usize];
reader
.read_exact(&mut buf)
.await
Expand Down

0 comments on commit 84c04ab

Please sign in to comment.