From 8a50bbcaa328f3cd80bf89c23533674329f32dce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 9 Aug 2022 16:20:08 +0300 Subject: [PATCH] audiobuffer: Remove unnecessary ref/deref warning: deref on an immutable reference --> gstreamer-audio/src/audio_buffer.rs:255:35 | 255 | Self::Owned(ref b) => &*b, | ^^^ | = note: `#[warn(clippy::borrow_deref_ref)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref --- gstreamer-audio/src/audio_buffer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gstreamer-audio/src/audio_buffer.rs b/gstreamer-audio/src/audio_buffer.rs index fb9392b1e..1a8946b22 100644 --- a/gstreamer-audio/src/audio_buffer.rs +++ b/gstreamer-audio/src/audio_buffer.rs @@ -252,7 +252,7 @@ impl ops::Deref for AudioBufferPtr { fn deref(&self) -> &Self::Target { match self { - Self::Owned(ref b) => &*b, + Self::Owned(ref b) => b, Self::Borrowed(ref b) => unsafe { b.as_ref() }, } }