scoping. I heard that's a thing in Rust.

This commit is contained in:
bunnie 2021-10-17 16:47:08 +08:00
parent a7d8a4c1e0
commit 4a2445483d

View file

@ -264,7 +264,6 @@ fn xmain() -> ! {
let ip_addrs = [IpCidr::new(Ipv4Address::UNSPECIFIED.into(), 0)];
let routes = Routes::new(BTreeMap::new());
let device = device::NetPhy::new(&xns);
let device_caps = device.capabilities();
let medium = device.capabilities().medium;
let mut builder = InterfaceBuilder::new(device)
.ip_addrs(ip_addrs)
@ -274,7 +273,7 @@ fn xmain() -> ! {
.ethernet_addr(mac)
.neighbor_cache(neighbor_cache);
}
let mut iface = builder.finalize();
iface = builder.finalize();
let ip_addr =
Ipv4Cidr::new(Ipv4Address::new(