virtio-devices: Call closure directly rather than indirect

As identified by the new beta clippy.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2021-10-19 15:01:42 +01:00
parent 4ae8ee2376
commit 48d4ccbfeb

View File

@ -44,7 +44,7 @@ where
return; return;
} }
} }
std::panic::catch_unwind(AssertUnwindSafe(move || f())) std::panic::catch_unwind(AssertUnwindSafe(f))
.or_else(|_| { .or_else(|_| {
error!("{} thread panicked", thread_name); error!("{} thread panicked", thread_name);
thread_exit_evt.write(1) thread_exit_evt.write(1)