mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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 <robert.bradford@intel.com>
This commit is contained in:
@@ -482,10 +482,7 @@ fn get_seccomp_filter_log(thread_type: Thread) -> Result<SeccompFilter, Error> {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user