From a2046f93535b669e9b954b6a13ae7cad750d66bb Mon Sep 17 00:00:00 2001 From: sylvain-pierrot Date: Thu, 2 May 2024 10:55:43 +0200 Subject: [PATCH] fix: cargo clippy Signed-off-by: sylvain-pierrot --- src/vmm/src/core/devices/virtio/net/tuntap/tap.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vmm/src/core/devices/virtio/net/tuntap/tap.rs b/src/vmm/src/core/devices/virtio/net/tuntap/tap.rs index 3b4ea86..1dbabb9 100644 --- a/src/vmm/src/core/devices/virtio/net/tuntap/tap.rs +++ b/src/vmm/src/core/devices/virtio/net/tuntap/tap.rs @@ -202,7 +202,8 @@ impl Tap { /// Get tap name pub fn get_name(&self) -> Result { - Ok(String::from_utf8(self.if_name.clone()).map_err(|_| Error::InvalidIfname)?) + let name = String::from_utf8(self.if_name.clone()).map_err(|_| Error::InvalidIfname)?; + Ok(name) } /// Get mac addr for tap interface.