mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: Fix beta clippy issues
Fixing the following clippy issue using `cargo clippy --fix`:
error: variables can be used directly in the `format!` string
--> build.rs:25:27
|
25 | version.push_str(&format!("-{}", extra_version));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
Signed-off-by: Bo Chen <bchen@crusoe.ai>
This commit is contained in:
@@ -726,7 +726,7 @@ pub fn exec_host_command_with_retries(command: &str, retries: u32, interval: Dur
|
||||
for _ in 0..retries {
|
||||
let s = exec_host_command_output(command).status;
|
||||
if !s.success() {
|
||||
eprintln!("\n\n==== retrying in {:?} ===\n\n", interval);
|
||||
eprintln!("\n\n==== retrying in {interval:?} ===\n\n");
|
||||
thread::sleep(interval);
|
||||
} else {
|
||||
return true;
|
||||
@@ -744,7 +744,7 @@ pub fn exec_host_command_output(command: &str) -> Output {
|
||||
let output = std::process::Command::new("bash")
|
||||
.args(["-c", command])
|
||||
.output()
|
||||
.unwrap_or_else(|e| panic!("Expected '{command}' to run. Error: {:?}", e));
|
||||
.unwrap_or_else(|e| panic!("Expected '{command}' to run. Error: {e:?}"));
|
||||
|
||||
if !output.status.success() {
|
||||
let stdout = String::from_utf8_lossy(&output.stdout);
|
||||
|
||||
Reference in New Issue
Block a user