misc: Automatically fix cargo clippy issues added in 1.65 (stable)

The code of the stable branch diverges from the main branch, so we
can't directly backport the corresponding commit to fix the clippy
issues.

See: commit 5e52729453

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen
2023-01-18 12:43:36 -08:00
committed by Bo Chen
parent 1adfb7e9f8
commit c91a8e1324
60 changed files with 457 additions and 583 deletions

View File

@@ -477,7 +477,7 @@ fn start_vmm(cmd_arguments: ArgMatches) -> Result<Option<String>, Error> {
"log" => SeccompAction::Log,
_ => {
// The user providing an invalid value will be rejected by clap
panic!("Invalid parameter {} for \"--seccomp\" flag", seccomp_value);
panic!("Invalid parameter {seccomp_value} for \"--seccomp\" flag");
}
}
} else {
@@ -497,7 +497,7 @@ fn start_vmm(cmd_arguments: ArgMatches) -> Result<Option<String>, Error> {
signal_hook::low_level::emulate_default_handler(SIGSYS).unwrap();
})
}
.map_err(|e| eprintln!("Error adding SIGSYS signal handler: {}", e))
.map_err(|e| eprintln!("Error adding SIGSYS signal handler: {e}"))
.ok();
}
@@ -506,13 +506,13 @@ fn start_vmm(cmd_arguments: ArgMatches) -> Result<Option<String>, Error> {
// dedicated signal handling thread we'll start in a bit.
for sig in &vmm::vm::Vm::HANDLED_SIGNALS {
if let Err(e) = block_signal(*sig) {
eprintln!("Error blocking signals: {}", e);
eprintln!("Error blocking signals: {e}");
}
}
for sig in &vmm::Vmm::HANDLED_SIGNALS {
if let Err(e) = block_signal(*sig) {
eprintln!("Error blocking signals: {}", e);
eprintln!("Error blocking signals: {e}");
}
}
@@ -602,7 +602,7 @@ fn main() {
0
}
Err(e) => {
eprintln!("{}", e);
eprintln!("{e}");
1
}
};