From 55eec8567e2aa98477060f954f683456c9e0e8a8 Mon Sep 17 00:00:00 2001 From: Mariusz Ceier Date: Tue, 18 Aug 2015 08:54:40 +0200 Subject: [PATCH] Add more detailed message to panic When samples format is not supported, cpal panics with "not yet implemented" message, which is not useful in bug reports. This adds samples format to the message. Signed-off-by: Mariusz Ceier --- src/wasapi/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wasapi/mod.rs b/src/wasapi/mod.rs index 35d3ecc..7346ee0 100644 --- a/src/wasapi/mod.rs +++ b/src/wasapi/mod.rs @@ -41,7 +41,7 @@ impl Voice { pub fn get_samples_format(&self) -> ::SampleFormat { match self.bits_per_sample { 16 => ::SampleFormat::I16, - _ => unimplemented!(), + _ => panic!("{}-bit format not yet supported", self.bits_per_sample), } }