Skip to content
Snippets Groups Projects
Commit 07fbe209 authored by Stefan Lankes's avatar Stefan Lankes
Browse files

remove clippy warnings

parent f9d99a12
Branches
Tags mariadb-10.1.2
No related merge requests found
......@@ -95,7 +95,7 @@ impl<'a> NetworkInterface<'a> {
let mut config = Config::new();
config.random_seed = (arch::get_boot_time() + arch::processor::get_timer_ticks()) / 1000000;
if device.capabilities().medium == Medium::Ethernet {
config.hardware_addr = Some(hardware_addr).into();
config.hardware_addr = Some(hardware_addr);
}
let iface = Interface::new(config, &mut device);
......
......@@ -144,10 +144,8 @@ impl<'a> NetworkInterface<'a> {
self.iface.update_ip_addrs(|addrs| {
if let Some(dest) = addrs.iter_mut().next() {
*dest = IpCidr::Ipv4(config.address);
} else {
if !addrs.push(IpCidr::Ipv4(config.address)).is_ok() {
info!("Unable to update IP address");
}
} else if addrs.push(IpCidr::Ipv4(config.address)).is_err() {
info!("Unable to update IP address");
}
});
if let Some(router) = config.router {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment