From 1cbd327694e5000999f345ade5091ce0621575f0 Mon Sep 17 00:00:00 2001 From: sylvain-pierrot Date: Thu, 2 May 2024 21:58:11 +0200 Subject: [PATCH] fix: cargo clippy Signed-off-by: sylvain-pierrot --- src/vmm/src/core/devices/virtio/net/bridge.rs | 2 +- src/vmm/src/core/devices/virtio/net/iptables.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vmm/src/core/devices/virtio/net/bridge.rs b/src/vmm/src/core/devices/virtio/net/bridge.rs index 6412cb4..a0f1500 100644 --- a/src/vmm/src/core/devices/virtio/net/bridge.rs +++ b/src/vmm/src/core/devices/virtio/net/bridge.rs @@ -17,7 +17,7 @@ impl Bridge { tokio::spawn(connection); let br = Self { name, handle }; - let _ = br.create_bridge_if_not_exist(); + br.create_bridge_if_not_exist(); br } diff --git a/src/vmm/src/core/devices/virtio/net/iptables.rs b/src/vmm/src/core/devices/virtio/net/iptables.rs index bbe22f5..d7d66de 100644 --- a/src/vmm/src/core/devices/virtio/net/iptables.rs +++ b/src/vmm/src/core/devices/virtio/net/iptables.rs @@ -4,7 +4,7 @@ use super::xx_netmask_width; pub fn iptables_ip_masq(network: Ipv4Addr, netmask: Ipv4Addr) { let prefix_len = xx_netmask_width(netmask.octets()); - let source = format!("{}/{}", network.to_string(), prefix_len); + let source = format!("{}/{}", network, prefix_len); let ipt = iptables::new(false).unwrap(); let rule = format!("-s {} ! -o br0 -j MASQUERADE", source);