clippy lints [nfc]
This commit is contained in:
parent
943ab2bd6d
commit
0d6402e81a
|
@ -82,8 +82,8 @@ impl TcpSocketStorage {
|
|||
}
|
||||
}
|
||||
|
||||
impl NetStorage {
|
||||
pub fn new() -> Self {
|
||||
impl Default for NetStorage {
|
||||
fn default() -> Self {
|
||||
NetStorage {
|
||||
// Placeholder for the real IP address, which is initialized at runtime.
|
||||
ip_addrs: [smoltcp::wire::IpCidr::Ipv6(
|
||||
|
@ -671,7 +671,7 @@ pub fn setup(
|
|||
// Note(unwrap): The hardware configuration function is only allowed to be called once.
|
||||
// Unwrapping is intended to panic if called again to prevent re-use of global memory.
|
||||
let store =
|
||||
cortex_m::singleton!(: NetStorage = NetStorage::new()).unwrap();
|
||||
cortex_m::singleton!(: NetStorage = NetStorage::default()).unwrap();
|
||||
|
||||
store.ip_addrs[0] = smoltcp::wire::IpCidr::new(
|
||||
smoltcp::wire::IpAddress::Ipv4(
|
||||
|
|
|
@ -74,12 +74,10 @@ impl NetworkProcessor {
|
|||
// Service the network stack to process any inbound and outbound traffic.
|
||||
let now = self.clock.current_ms();
|
||||
|
||||
let result = match self.stack.lock(|stack| stack.poll(now)) {
|
||||
match self.stack.lock(|stack| stack.poll(now)) {
|
||||
Ok(true) => UpdateState::Updated,
|
||||
Ok(false) => UpdateState::NoChange,
|
||||
Err(_) => UpdateState::Updated,
|
||||
};
|
||||
|
||||
result
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue