Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
kmd-fl committed Oct 9, 2024
1 parent a9c515c commit 44cdf23
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crates/vm-utils/src/vm_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ struct AutocloseConnect(Connect);
impl AutocloseConnect {
fn open(uri: &str) -> Result<Self, VmError> {
Connect::open(Some(uri))
.map(|conn| Self(conn))
.map(Self)
.map_err(|err| VmError::FailedToConnect { err })
}
}
Expand Down Expand Up @@ -326,11 +326,10 @@ pub fn status_vm(uri: &str, name: &str) -> Result<VmStatus, VmError> {
name: name.to_string(),
err,
})?;
let status = get_status(&domain).map_err(|err| VmError::FailedToGetInfo {
get_status(&domain).map_err(|err| VmError::FailedToGetInfo {
name: name.to_string(),
err,
});
status
})
}

fn get_status(domain: &Domain) -> Result<VmStatus, virt::error::Error> {
Expand Down

0 comments on commit 44cdf23

Please sign in to comment.