Avoid unused variables in the network module

This commit is contained in:
Ruihan Li
2024-06-18 16:05:20 +08:00
committed by Tate, Hongliang Tian
parent 94e043ac8d
commit 5eefd600cc
18 changed files with 34 additions and 79 deletions

View File

@ -1,9 +1,7 @@
// SPDX-License-Identifier: MPL-2.0
#![allow(unused_variables)]
use smoltcp::{
iface::{Config, Routes},
iface::Config,
phy::{Loopback, Medium},
wire::IpCidr,
};
@ -27,7 +25,6 @@ impl IfaceLoopback {
pub fn new() -> Arc<Self> {
let mut loopback = Loopback::new(Medium::Ip);
let interface = {
let routes = Routes::new();
let config = Config::new();
let mut interface = smoltcp::iface::Interface::new(config, &mut loopback);
interface.update_ip_addrs(|ip_addrs| {