Enforce some lints.
This commit is contained in:
parent
4826d37c45
commit
dd0f4b706a
|
@ -8,7 +8,6 @@ extern crate byteorder;
|
|||
mod utils;
|
||||
|
||||
use std::str::{self, FromStr};
|
||||
use std::cmp;
|
||||
use std::time::Instant;
|
||||
use std::os::unix::io::AsRawFd;
|
||||
use smoltcp::phy::wait as phy_wait;
|
||||
|
|
|
@ -274,7 +274,7 @@ impl<'a, 'b, 'c, DeviceT: Device + 'a> Interface<'a, 'b, 'c, DeviceT> {
|
|||
}
|
||||
|
||||
fn process_ipv4<'frame, T: AsRef<[u8]>>
|
||||
(&mut self, sockets: &mut SocketSet, timestamp: u64,
|
||||
(&mut self, sockets: &mut SocketSet, _timestamp: u64,
|
||||
eth_frame: &EthernetFrame<&'frame T>) ->
|
||||
Result<Packet<'frame>> {
|
||||
let ipv4_packet = Ipv4Packet::new_checked(eth_frame.payload())?;
|
||||
|
@ -329,7 +329,7 @@ impl<'a, 'b, 'c, DeviceT: Device + 'a> Interface<'a, 'b, 'c, DeviceT> {
|
|||
|
||||
#[cfg(feature = "socket-tcp")]
|
||||
IpProtocol::Tcp =>
|
||||
Self::process_tcp(sockets, timestamp, ip_repr, ip_payload),
|
||||
Self::process_tcp(sockets, _timestamp, ip_repr, ip_payload),
|
||||
|
||||
#[cfg(feature = "socket-raw")]
|
||||
_ if handled_by_raw_socket =>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#![cfg_attr(feature = "alloc", feature(alloc))]
|
||||
#![no_std]
|
||||
#![deny(unsafe_code, unused)]
|
||||
|
||||
//! The _smoltcp_ library is built in a layered structure, with the layers corresponding
|
||||
//! to the levels of API abstraction. Only the highest layers would be used by a typical
|
||||
|
@ -67,6 +68,12 @@
|
|||
//! feature ever defined, to ensure that, when the representation layer is unable to make sense
|
||||
//! of a packet, it is still logged correctly and in full.
|
||||
|
||||
/* XXX compiler bug
|
||||
#![cfg(not(any(feature = "socket-raw",
|
||||
feature = "socket-udp",
|
||||
feature = "socket-tcp")))]
|
||||
compile_error!("at least one socket needs to be enabled"); */
|
||||
|
||||
extern crate byteorder;
|
||||
extern crate managed;
|
||||
#[cfg(any(test, feature = "std"))]
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#![allow(unsafe_code)]
|
||||
|
||||
use libc;
|
||||
use std::{mem, ptr, io};
|
||||
use std::os::unix::io::RawFd;
|
||||
|
|
Loading…
Reference in New Issue