diff --git a/build.rs b/build.rs index cb006871..935f83ce 100644 --- a/build.rs +++ b/build.rs @@ -120,13 +120,12 @@ fn build_web() { "yarn" }; - let version = Command::new(&program) + let version = Command::new(program) .args(["--version"]) .status() - .expect(&format!( - "Failed to build frontend, `{}` appears to be not installed.", - &program - )); + .unwrap_or_else(|_| { + panic!("Failed to build frontend, `{program}` appears to be not installed.",) + }); if !version.success() { panic!("{program} version failed!");