From 97e33de489ef82ecb1ad87a82491098566f2bedf Mon Sep 17 00:00:00 2001 From: "Chris (ChrisJr404)" <11917633+ChrisJr404@users.noreply.github.com> Date: Wed, 26 Aug 2026 13:07:55 -0400 Subject: [PATCH] docs: show the config conversion in the output stream example The example built config from a hidden line, so readers could not see that a SupportedStreamConfig must be converted with into() before it can be passed to build_output_stream. --- src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 6ecbecae7..bebc78946 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -69,7 +69,8 @@ //! use cpal::traits::{DeviceTrait, HostTrait, StreamTrait}; //! # let host = cpal::default_host(); //! # let device = host.default_output_device().unwrap(); -//! # let config = device.default_output_config().unwrap().into(); +//! # let supported_config = device.default_output_config().unwrap(); +//! let config = supported_config.into(); //! let stream = device.build_output_stream( //! config, //! move |data: &mut [f32], _: &cpal::CallbackInfo| {