From 0a2e6e47c9dda4cca37f3a004e03f18ffa2ba3b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 12 Oct 2022 21:38:38 +0300 Subject: [PATCH] ndi: Silence some more clippy warnings --- net/ndi/src/ndisink/imp.rs | 1 + net/ndi/src/ndisys.rs | 9 ++++++++- net/ndi/src/receiver.rs | 2 -- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/net/ndi/src/ndisink/imp.rs b/net/ndi/src/ndisink/imp.rs index 24eb1694..cbf9a3e6 100644 --- a/net/ndi/src/ndisink/imp.rs +++ b/net/ndi/src/ndisink/imp.rs @@ -168,6 +168,7 @@ impl ElementImpl for NdiSink { PAD_TEMPLATES.as_ref() } + #[allow(clippy::single_match)] fn change_state( &self, transition: gst::StateChange, diff --git a/net/ndi/src/ndisys.rs b/net/ndi/src/ndisys.rs index b5c813fe..4b062496 100644 --- a/net/ndi/src/ndisys.rs +++ b/net/ndi/src/ndisys.rs @@ -1,6 +1,12 @@ // SPDX-License-Identifier: MPL-2.0 -#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow( + non_camel_case_types, + non_upper_case_globals, + non_snake_case, + clippy::upper_case_acronyms, + clippy::missing_safety_doc +)] #[cfg(unix)] use libloading::os::unix::{Library, Symbol}; @@ -16,6 +22,7 @@ const LIBRARY_NAME: &str = "libndi.so.5"; #[cfg(target_os = "macos")] const LIBRARY_NAME: &str = "libndi.dylib"; +#[allow(clippy::type_complexity)] struct FFI { _library: Library, initialize: Symbol bool>, diff --git a/net/ndi/src/receiver.rs b/net/ndi/src/receiver.rs index bf728e64..6c1298ba 100644 --- a/net/ndi/src/receiver.rs +++ b/net/ndi/src/receiver.rs @@ -1604,8 +1604,6 @@ impl Receiver { #[cfg(feature = "advanced-sdk")] if [NDIlib_FourCC_audio_type_AAC].contains(&fourcc) { - use std::convert::TryInto; - let compressed_packet = audio_frame.compressed_packet().ok_or_else(|| { error!( CAT,