From 48d4ccbfebaa710498d18020f98b51ccd8ec3b5f Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Tue, 19 Oct 2021 15:01:42 +0100 Subject: [PATCH] virtio-devices: Call closure directly rather than indirect As identified by the new beta clippy. Signed-off-by: Rob Bradford --- virtio-devices/src/thread_helper.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtio-devices/src/thread_helper.rs b/virtio-devices/src/thread_helper.rs index 579742ab3..6260bdde9 100644 --- a/virtio-devices/src/thread_helper.rs +++ b/virtio-devices/src/thread_helper.rs @@ -44,7 +44,7 @@ where return; } } - std::panic::catch_unwind(AssertUnwindSafe(move || f())) + std::panic::catch_unwind(AssertUnwindSafe(f)) .or_else(|_| { error!("{} thread panicked", thread_name); thread_exit_evt.write(1)