Add missing `Hash` constraint to `StreamId`
This existed prior to the introduction of the `Host` API, but was lost in translation. This re-adds the bounds so that downstream code does not suddenly break due to a lacking `Hash` implementation in the next CPAL version.
This commit is contained in:
parent
5b6570e661
commit
6cd7492f4c
|
@ -64,7 +64,7 @@ macro_rules! impl_platform_host {
|
||||||
|
|
||||||
/// The **StreamId** implementation associated with the platform's dynamically dispatched
|
/// The **StreamId** implementation associated with the platform's dynamically dispatched
|
||||||
/// **Host** type.
|
/// **Host** type.
|
||||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
|
||||||
pub struct StreamId(StreamIdInner);
|
pub struct StreamId(StreamIdInner);
|
||||||
|
|
||||||
/// The **SupportedInputFormats** iterator associated with the platform's dynamically
|
/// The **SupportedInputFormats** iterator associated with the platform's dynamically
|
||||||
|
@ -107,7 +107,7 @@ macro_rules! impl_platform_host {
|
||||||
)*
|
)*
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
|
||||||
enum StreamIdInner {
|
enum StreamIdInner {
|
||||||
$(
|
$(
|
||||||
$HostVariant(crate::host::$host_mod::StreamId),
|
$HostVariant(crate::host::$host_mod::StreamId),
|
||||||
|
|
|
@ -195,4 +195,4 @@ pub trait EventLoopTrait {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The set of required bounds for host `StreamId` types.
|
/// The set of required bounds for host `StreamId` types.
|
||||||
pub trait StreamIdTrait: Clone + std::fmt::Debug + PartialEq + Eq {}
|
pub trait StreamIdTrait: Clone + std::fmt::Debug + std::hash::Hash + PartialEq + Eq {}
|
||||||
|
|
Loading…
Reference in New Issue