Add dyn to the traits

This fixes a few warnings on nightly
This commit is contained in:
est31 2019-08-10 23:03:19 +02:00
parent 5ace238a92
commit 70c2985b7c
3 changed files with 7 additions and 7 deletions

View file

@ -41,7 +41,7 @@ where
/// The input of the mixer.
pub struct DynamicMixerController<S> {
has_pending: AtomicBool,
pending_sources: Mutex<Vec<Box<Source<Item = S> + Send>>>,
pending_sources: Mutex<Vec<Box<dyn Source<Item = S> + Send>>>,
channels: u16,
sample_rate: u32,
}
@ -68,7 +68,7 @@ where
/// The output of the mixer. Implements `Source`.
pub struct DynamicMixer<S> {
// The current iterator that produces samples.
current_sources: Vec<Box<Source<Item = S> + Send>>,
current_sources: Vec<Box<dyn Source<Item = S> + Send>>,
// The pending sounds.
input: Arc<DynamicMixerController<S>>,

View file

@ -48,7 +48,7 @@ where
/// The input of the queue.
pub struct SourcesQueueInput<S> {
next_sounds: Mutex<Vec<(Box<Source<Item = S> + Send>, Option<Sender<()>>)>>,
next_sounds: Mutex<Vec<(Box<dyn Source<Item = S> + Send>, Option<Sender<()>>)>>,
// See constructor.
keep_alive_if_empty: AtomicBool,
@ -98,7 +98,7 @@ where
/// The output of the queue. Implements `Source`.
pub struct SourcesQueueOutput<S> {
// The current iterator that produces samples.
current: Box<Source<Item = S> + Send>,
current: Box<dyn Source<Item = S> + Send>,
// Signal this sender before picking from `next`.
signal_after_end: Option<Sender<()>>,

View file

@ -302,7 +302,7 @@ where
}
}
impl<S> Source for Box<Source<Item = S>>
impl<S> Source for Box<dyn Source<Item = S>>
where
S: Sample,
{
@ -327,7 +327,7 @@ where
}
}
impl<S> Source for Box<Source<Item = S> + Send>
impl<S> Source for Box<dyn Source<Item = S> + Send>
where
S: Sample,
{
@ -352,7 +352,7 @@ where
}
}
impl<S> Source for Box<Source<Item = S> + Send + Sync>
impl<S> Source for Box<dyn Source<Item = S> + Send + Sync>
where
S: Sample,
{