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
This commit is contained in:
Sebastian Dröge 2022-08-09 16:20:08 +03:00 committed by Sebastian Dröge
parent 9018d1e3ac
commit 8a50bbcaa3

View file

@ -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() },
}
}