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 <mceier+cpal@gmail.com>
This commit is contained in:
Mariusz Ceier 2015-08-18 08:54:40 +02:00
parent b1216f5e12
commit 55eec8567e
1 changed files with 1 additions and 1 deletions

View File

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