You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I saw in symphonia-play that clippy::needless_update is allowed because the fields of AudioDecoderOptions may change, but that shouldn't require a code change to symphonia-play. The intended mechanism for this is to use the #[non_exhaustive] marker on AudioDecoderOptions, but that requires more code since non_exhaustive structs can't be updated with a spread pattern.
The "right" way to do this would be to create some sort of builder, either by hand or with something like bon, so that downstream users would call AudioDecoderOptions::builder().verify(bool).build(). i.e.:
// symphonia-core/src/codecs/audio.rs
use bon::Builder;
/// `AudioDecoderOptions` is a common set of options that all audio decoders use.
#[derive(Copy, Clone, Debug, Default, Builder)]
#[non_exhaustive]
pub struct AudioDecoderOptions {
/// The decoded audio should be verified if possible during the decode process.
#[builder(default)]
pub verify: bool,
}
The text was updated successfully, but these errors were encountered:
I saw in
symphonia-play
thatclippy::needless_update
is allowed because the fields ofAudioDecoderOptions
may change, but that shouldn't require a code change tosymphonia-play
. The intended mechanism for this is to use the#[non_exhaustive]
marker onAudioDecoderOptions
, but that requires more code sincenon_exhaustive
structs can't be updated with a spread pattern.The "right" way to do this would be to create some sort of builder, either by hand or with something like bon, so that downstream users would call
AudioDecoderOptions::builder().verify(bool).build()
. i.e.:The text was updated successfully, but these errors were encountered: