From 809ad5d5bd97485ef5ac2736ffddde0c03be881b Mon Sep 17 00:00:00 2001 From: Christopher Angelo Date: Sat, 20 Dec 2025 04:20:08 +0700 Subject: [PATCH] Better error on OutputStreamBuilder::open_stream I'd think the panic will make much more sense if there's the word `No` in front of it :) --- src/stream.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stream.rs b/src/stream.rs index 446c69a7..4fdbba09 100644 --- a/src/stream.rs +++ b/src/stream.rs @@ -342,7 +342,7 @@ where /// Open output stream using parameters configured so far. pub fn open_stream(self) -> Result { - let device = self.device.as_ref().expect("output device specified"); + let device = self.device.as_ref().expect("No output device specified"); OutputStream::open(device, &self.config, self.error_callback) } @@ -355,7 +355,7 @@ where where E: Clone, { - let device = self.device.as_ref().expect("output device specified"); + let device = self.device.as_ref().expect("No output device specified"); let error_callback = &self.error_callback; OutputStream::open(device, &self.config, error_callback.clone()).or_else(|err| {