From 7c9a83f6e1b4ec57942b2d2de159dac211901b78 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Thu, 25 Mar 2021 17:01:21 +0000 Subject: [PATCH] virtio-devices: Address Rust 1.51.0 clippy issue (needless_question_mark) warning: Question mark operator is useless here --> virtio-devices/src/seccomp_filters.rs:485:5 | 485 | / Ok(SeccompFilter::new( 486 | | rules.into_iter().collect(), 487 | | SeccompAction::Log, 488 | | )?) | |_______^ | = note: `#[warn(clippy::needless_question_mark)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: try | 485 | SeccompFilter::new( 486 | rules.into_iter().collect(), 487 | SeccompAction::Log, 488 | ) | Signed-off-by: Rob Bradford --- virtio-devices/src/seccomp_filters.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/virtio-devices/src/seccomp_filters.rs b/virtio-devices/src/seccomp_filters.rs index c61f9022f..aa9703b52 100644 --- a/virtio-devices/src/seccomp_filters.rs +++ b/virtio-devices/src/seccomp_filters.rs @@ -482,10 +482,7 @@ fn get_seccomp_filter_log(thread_type: Thread) -> Result { Thread::VirtioWatchdog => virtio_watchdog_thread_rules(), }; - Ok(SeccompFilter::new( - rules.into_iter().collect(), - SeccompAction::Log, - )?) + SeccompFilter::new(rules.into_iter().collect(), SeccompAction::Log) } /// Generate a BPF program based on the seccomp_action value