From 960b1d5a40b482f1e8a80b547ae59232c2b1a5bd Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Fri, 7 Jun 2019 21:05:14 +0200 Subject: [PATCH] Remove unnecessary panic! from OutputBuffer Deref impl Since #269 this `panic!` is certainly unnecessary as `InputBuffer` and `OutputBuffer` are a thin wrapper around a slice. That said, I'm struggling to understand exactly why this `panic!` was necessary in the first place. This closes #228. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index df67038..932206d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -602,7 +602,7 @@ impl<'a, T> Deref for OutputBuffer<'a, T> #[inline] fn deref(&self) -> &[T] { - panic!("It is forbidden to read from the audio buffer"); + self.buffer } }