Skip to content

Commit edd9741

Browse files
Make Platform Impl SupportedConfigs Clone (#954)
* Make SupportedInput/OutputConfigs Cloneable * Fix Null Host
1 parent 8412683 commit edd9741

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/host/null/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ pub struct Host;
1919
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2020
pub struct Stream;
2121

22+
#[derive(Clone)]
2223
pub struct SupportedInputConfigs;
24+
#[derive(Clone)]
2325
pub struct SupportedOutputConfigs;
2426

2527
impl Host {

src/platform/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,12 @@ macro_rules! impl_platform_host {
6969

7070
/// The `SupportedInputConfigs` iterator associated with the platform's dynamically
7171
/// dispatched [`Host`] type.
72+
#[derive(Clone)]
7273
pub struct SupportedInputConfigs(SupportedInputConfigsInner);
7374

7475
/// The `SupportedOutputConfigs` iterator associated with the platform's dynamically
7576
/// dispatched [`Host`] type.
77+
#[derive(Clone)]
7678
pub struct SupportedOutputConfigs(SupportedOutputConfigsInner);
7779

7880
/// Unique identifier for available hosts on the platform.
@@ -117,13 +119,15 @@ macro_rules! impl_platform_host {
117119
)*
118120
}
119121

122+
#[derive(Clone)]
120123
enum SupportedInputConfigsInner {
121124
$(
122125
$(#[cfg($feat)])?
123126
$HostVariant(crate::host::$host_mod::SupportedInputConfigs),
124127
)*
125128
}
126129

130+
#[derive(Clone)]
127131
enum SupportedOutputConfigsInner {
128132
$(
129133
$(#[cfg($feat)])?

0 commit comments

Comments
 (0)