mirror of
https://github.com/aramperes/onetun.git
synced 2025-09-09 06:58: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
|
||||
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()));
|
||||
|
|
|
@ -229,7 +229,7 @@ impl VirtualInterfacePoll for TcpVirtualInterface {
|
|||
next_poll = None;
|
||||
}
|
||||
}
|
||||
Event::VirtualDeviceFed(protocol) if protocol == PortProtocol::Tcp => {
|
||||
Event::VirtualDeviceFed(PortProtocol::Tcp) => {
|
||||
next_poll = None;
|
||||
}
|
||||
_ => {}
|
||||
|
|
|
@ -198,7 +198,7 @@ impl VirtualInterfacePoll for UdpVirtualInterface {
|
|||
}
|
||||
next_poll = None;
|
||||
}
|
||||
Event::VirtualDeviceFed(protocol) if protocol == PortProtocol::Udp => {
|
||||
Event::VirtualDeviceFed(PortProtocol::Udp) => {
|
||||
next_poll = None;
|
||||
}
|
||||
_ => {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue