Skip to content

Commit

Permalink
pass clippy check
Browse files Browse the repository at this point in the history
  • Loading branch information
yorktown-class committed Oct 11, 2023
1 parent ca28e43 commit 5980c5a
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 @@ -116,8 +116,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 5980c5a

Please sign in to comment.