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.