Skip to content

Commit

Permalink
fix: cargo clippy
Browse files Browse the repository at this point in the history
Signed-off-by: sylvain-pierrot <[email protected]>
  • Loading branch information
sylvain-pierrot committed May 2, 2024
1 parent a760840 commit a2046f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vmm/src/core/devices/virtio/net/tuntap/tap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ impl Tap {

/// Get tap name
pub fn get_name(&self) -> Result<String> {
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.
Expand Down

0 comments on commit a2046f9

Please sign in to comment.