diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2021-09-08 15:33:31 +0300 |
---|---|---|
committer | Sebastian Dröge <slomo@coaxion.net> | 2021-09-08 15:35:41 +0300 |
commit | 96d86eaa069165f42abe6a0907c99016cab5db52 (patch) | |
tree | 17a116d8cb8dac35fb85d2f4d6a92ed675c0e084 /audio/audiofx | |
parent | 626df039615f38535fed9d6f1f7c53ddeb4f40f0 (diff) |
Clean up clippy warnings and CI configuration
Put clippy overrides into the sources files instead of the CI
configuration, and fix various warnings / clean up code.
Diffstat (limited to 'audio/audiofx')
-rw-r--r-- | audio/audiofx/src/audioloudnorm/imp.rs | 4 | ||||
-rw-r--r-- | audio/audiofx/tests/ebur128level.rs | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/audio/audiofx/src/audioloudnorm/imp.rs b/audio/audiofx/src/audioloudnorm/imp.rs index 22eccec0..429f64ed 100644 --- a/audio/audiofx/src/audioloudnorm/imp.rs +++ b/audio/audiofx/src/audioloudnorm/imp.rs @@ -1049,7 +1049,7 @@ impl State { // Calculate the current position in the attack window let cur_pos = (current_gain_reduction - self.gain_reduction[0]) / old_slope; - assert!(cur_pos >= 0.0 && cur_pos <= 1.0); + assert!((0.0..=1.0).contains(&cur_pos)); self.env_cnt = ((LIMITER_ATTACK_WINDOW as f64 - 1.0) * cur_pos) as usize; // Need to sustain in any case for this many samples to actually @@ -1684,6 +1684,7 @@ impl AudioLoudNorm { pad.event_default(Some(element), event) } + #[allow(clippy::single_match)] fn src_query( &self, pad: &gst::Pad, @@ -1911,6 +1912,7 @@ impl ElementImpl for AudioLoudNorm { PAD_TEMPLATES.as_ref() } + #[allow(clippy::single_match)] fn change_state( &self, element: &Self::Type, diff --git a/audio/audiofx/tests/ebur128level.rs b/audio/audiofx/tests/ebur128level.rs index 95a8f6d1..30f98654 100644 --- a/audio/audiofx/tests/ebur128level.rs +++ b/audio/audiofx/tests/ebur128level.rs @@ -6,6 +6,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(clippy::single_match)] + use gst::glib; use gst::prelude::*; |