Skip to content

Commit

Permalink
fixes clippy::missing_panics_doc
Browse files Browse the repository at this point in the history
... indirectly by using let-else instead of expect
  • Loading branch information
wookietreiber committed Oct 20, 2023
1 parent 8612b21 commit b213b9a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/analysis/spectrum_scale.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,17 @@ pub fn run(

log::debug!("command: {command:?}");

let mut child = command
.stdout(Stdio::null())
.spawn()
.expect("mmapplypolicy failed to start, make sure it's on your PATH");
let Ok(mut child) = command.stdout(Stdio::null()).spawn() else {
return Err(anyhow!(
"mmapplypolicy failed to start, make sure it's on your PATH",
));
};

log::debug!("waiting for mmapplypolicy to finish");

let ecode = child.wait().expect("failed waiting on mmapplypolicy");
let Ok(ecode) = child.wait() else {
return Err(anyhow!("failed waiting on mmapplypolicy"));
};

if ecode.success() {
let total_file = tmp.path().join("stor-age.list.total");
Expand Down

0 comments on commit b213b9a

Please sign in to comment.