From 4e131c9d57ace9ba4cd0894a5c5506011a90383b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=28=20=CD=A1=C2=B0=20=CD=9C=CA=96=20=CD=A1=C2=B0=29?= <35662205+peppizza@users.noreply.github.com> Date: Mon, 16 Nov 2020 10:54:29 -0500 Subject: [PATCH] Lint: Clippy warning cleanup (#8) --- src/input/mod.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/input/mod.rs b/src/input/mod.rs index 8d10c26ae..dc4129ec9 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -151,10 +151,8 @@ impl Input { /// Mixes the output of this stream into a 20ms stereo audio buffer. #[inline] pub fn mix(&mut self, float_buffer: &mut [f32; STEREO_FRAME_SIZE], volume: f32) -> usize { - match self.add_float_pcm_frame(float_buffer, self.stereo, volume) { - Some(len) => len, - None => 0, - } + self.add_float_pcm_frame(float_buffer, self.stereo, volume) + .unwrap_or(0) } /// Seeks the stream to the given time, if possible.