Remove some unneeded imports and a variable
These were flagged by `cargo clippy`: warning: returning the result of a `let` binding from a block warning: this import is redundant
This commit is contained in:
parent
fff5926210
commit
20c82238df
|
@ -1676,14 +1676,13 @@ impl<'b, 'c, 'e> InterfaceInner<'b, 'c, 'e> {
|
|||
fn igmp_leave_packet<'any>(&self, group_addr: Ipv4Address) -> Option<IpPacket<'any>> {
|
||||
self.ipv4_address().map(|iface_addr| {
|
||||
let igmp_repr = IgmpRepr::LeaveGroup { group_addr };
|
||||
let pkt = IpPacket::Igmp((Ipv4Repr {
|
||||
IpPacket::Igmp((Ipv4Repr {
|
||||
src_addr: iface_addr,
|
||||
dst_addr: Ipv4Address::MULTICAST_ALL_ROUTERS,
|
||||
protocol: IpProtocol::Igmp,
|
||||
payload_len: igmp_repr.buffer_len(),
|
||||
hop_limit: 1,
|
||||
}, igmp_repr));
|
||||
pkt
|
||||
}, igmp_repr))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
use libc;
|
||||
|
||||
#[cfg(any(feature = "phy-raw_socket",
|
||||
feature = "phy-tap_interface"))]
|
||||
pub const SIOCGIFMTU: libc::c_ulong = 0x8921;
|
||||
|
@ -14,4 +12,3 @@ pub const TUNSETIFF: libc::c_ulong = 0x400454CA;
|
|||
pub const IFF_TAP: libc::c_int = 0x0002;
|
||||
#[cfg(feature = "phy-tap_interface")]
|
||||
pub const IFF_NO_PI: libc::c_int = 0x1000;
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#![allow(unsafe_code)]
|
||||
|
||||
use libc;
|
||||
use std::{mem, ptr, io};
|
||||
use std::os::unix::io::RawFd;
|
||||
use crate::time::Duration;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use std::{mem, io};
|
||||
use std::os::unix::io::{RawFd, AsRawFd};
|
||||
use libc;
|
||||
use super::*;
|
||||
use crate::wire::EthernetFrame;
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use std::io;
|
||||
use std::os::unix::io::{RawFd, AsRawFd};
|
||||
use libc;
|
||||
use super::*;
|
||||
use crate::wire::EthernetFrame;
|
||||
|
||||
|
|
Loading…
Reference in New Issue