Fix new clippy warnings

This commit is contained in:
Aram 🍐 2023-12-21 15:16:57 -05:00
parent 7200cc07e7
commit 731218d943
3 changed files with 3 additions and 4 deletions

View file

@ -119,8 +119,7 @@ impl smoltcp::phy::TxToken for TxToken {
where
F: FnOnce(&mut [u8]) -> smoltcp::Result<R>,
{
let mut buffer = Vec::new();
buffer.resize(len, 0);
let mut buffer = vec![0; len];
let result = f(&mut buffer);
self.sender
.send(Event::OutboundInternetPacket(buffer.into()));