Skip to content

Commit 2effbfc

Browse files
authored
Merge pull request #816 from angeloanan/fix/better-error-outputstreambuffer
Better error on `OutputStreamBuilder::open_stream`
2 parents 744f27b + 809ad5d commit 2effbfc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/stream.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ where
347347

348348
/// Open output stream using parameters configured so far.
349349
pub fn open_stream(self) -> Result<OutputStream, StreamError> {
350-
let device = self.device.as_ref().expect("output device specified");
350+
let device = self.device.as_ref().expect("No output device specified");
351351

352352
OutputStream::open(device, &self.config, self.error_callback)
353353
}
@@ -360,7 +360,7 @@ where
360360
where
361361
E: Clone,
362362
{
363-
let device = self.device.as_ref().expect("output device specified");
363+
let device = self.device.as_ref().expect("No output device specified");
364364
let error_callback = &self.error_callback;
365365

366366
OutputStream::open(device, &self.config, error_callback.clone()).or_else(|err| {

0 commit comments

Comments
 (0)