mirror of
https://github.com/aramperes/onetun.git
synced 2025-09-09 12:38:31 -04:00
Fix new clippy warnings
This commit is contained in:
parent
7200cc07e7
commit
731218d943
3 changed files with 3 additions and 4 deletions
|
@ -119,8 +119,7 @@ impl smoltcp::phy::TxToken for TxToken {
|
||||||
where
|
where
|
||||||
F: FnOnce(&mut [u8]) -> smoltcp::Result<R>,
|
F: FnOnce(&mut [u8]) -> smoltcp::Result<R>,
|
||||||
{
|
{
|
||||||
let mut buffer = Vec::new();
|
let mut buffer = vec![0; len];
|
||||||
buffer.resize(len, 0);
|
|
||||||
let result = f(&mut buffer);
|
let result = f(&mut buffer);
|
||||||
self.sender
|
self.sender
|
||||||
.send(Event::OutboundInternetPacket(buffer.into()));
|
.send(Event::OutboundInternetPacket(buffer.into()));
|
||||||
|
|
|
@ -229,7 +229,7 @@ impl VirtualInterfacePoll for TcpVirtualInterface {
|
||||||
next_poll = None;
|
next_poll = None;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Event::VirtualDeviceFed(protocol) if protocol == PortProtocol::Tcp => {
|
Event::VirtualDeviceFed(PortProtocol::Tcp) => {
|
||||||
next_poll = None;
|
next_poll = None;
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
|
|
|
@ -198,7 +198,7 @@ impl VirtualInterfacePoll for UdpVirtualInterface {
|
||||||
}
|
}
|
||||||
next_poll = None;
|
next_poll = None;
|
||||||
}
|
}
|
||||||
Event::VirtualDeviceFed(protocol) if protocol == PortProtocol::Udp => {
|
Event::VirtualDeviceFed(PortProtocol::Udp) => {
|
||||||
next_poll = None;
|
next_poll = None;
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue