Add traits to SampleFormat's #[derive(...)] invocation (#864)

Specifically, `PartialOrd`, `Ord`, & `Hash`.
This commit is contained in:
ky-bean 2024-03-13 19:22:57 -07:00 • committed by GitHub
parent 437d47f762
commit 2ec761d30b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,7 +6,7 @@ pub use dasp_sample::{FromSample, Sample, I24, I48, U24, U48};
/// Format that each sample has. /// Format that each sample has.
#[cfg_attr(target_os = "emscripten", wasm_bindgen)] #[cfg_attr(target_os = "emscripten", wasm_bindgen)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[non_exhaustive] #[non_exhaustive]
pub enum SampleFormat { pub enum SampleFormat {
/// `i8` with a valid range of 'u8::MIN..=u8::MAX' with `0` being the origin /// `i8` with a valid range of 'u8::MIN..=u8::MAX' with `0` being the origin