mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
build: treewide: clippy: collapse nested ifs, use let chains
This bumps the MSRV to 1.88 (also, Rust edition 2024 is mandatory). Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
committed by
Bo Chen
parent
f73a6c8d8e
commit
c995b72384
@@ -36,12 +36,12 @@ where
|
||||
thread::Builder::new()
|
||||
.name(name.to_string())
|
||||
.spawn(move || {
|
||||
if !seccomp_filter.is_empty() {
|
||||
if let Err(e) = apply_filter(&seccomp_filter) {
|
||||
error!("Error applying seccomp filter: {:?}", e);
|
||||
thread_exit_evt.write(1).ok();
|
||||
return;
|
||||
}
|
||||
if !seccomp_filter.is_empty()
|
||||
&& let Err(e) = apply_filter(&seccomp_filter)
|
||||
{
|
||||
error!("Error applying seccomp filter: {:?}", e);
|
||||
thread_exit_evt.write(1).ok();
|
||||
return;
|
||||
}
|
||||
match std::panic::catch_unwind(AssertUnwindSafe(f)) {
|
||||
Err(_) => {
|
||||
|
||||
Reference in New Issue
Block a user