ndi: Silence some more clippy warnings

This commit is contained in:
Sebastian Dröge 2022-10-12 21:38:38 +03:00
parent db8037d16c
commit 0a2e6e47c9
3 changed files with 9 additions and 3 deletions

View file

@ -168,6 +168,7 @@ impl ElementImpl for NdiSink {
PAD_TEMPLATES.as_ref() PAD_TEMPLATES.as_ref()
} }
#[allow(clippy::single_match)]
fn change_state( fn change_state(
&self, &self,
transition: gst::StateChange, transition: gst::StateChange,

View file

@ -1,6 +1,12 @@
// SPDX-License-Identifier: MPL-2.0 // 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)] #[cfg(unix)]
use libloading::os::unix::{Library, Symbol}; use libloading::os::unix::{Library, Symbol};
@ -16,6 +22,7 @@ const LIBRARY_NAME: &str = "libndi.so.5";
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
const LIBRARY_NAME: &str = "libndi.dylib"; const LIBRARY_NAME: &str = "libndi.dylib";
#[allow(clippy::type_complexity)]
struct FFI { struct FFI {
_library: Library, _library: Library,
initialize: Symbol<fn() -> bool>, initialize: Symbol<fn() -> bool>,

View file

@ -1604,8 +1604,6 @@ impl Receiver {
#[cfg(feature = "advanced-sdk")] #[cfg(feature = "advanced-sdk")]
if [NDIlib_FourCC_audio_type_AAC].contains(&fourcc) { if [NDIlib_FourCC_audio_type_AAC].contains(&fourcc) {
use std::convert::TryInto;
let compressed_packet = audio_frame.compressed_packet().ok_or_else(|| { let compressed_packet = audio_frame.compressed_packet().ok_or_else(|| {
error!( error!(
CAT, CAT,