diff --git a/src/audio_backend/mod.rs b/src/audio_backend/mod.rs index 4b4f6bfe..e3b9b4ee 100644 --- a/src/audio_backend/mod.rs +++ b/src/audio_backend/mod.rs @@ -74,20 +74,19 @@ use self::pipe::StdoutSink; declare_backends! { pub const BACKENDS : &'static [ - (&'static str, - &'static (Fn(Option<&str>) -> Box + Sync + Send + 'static)) + (&'static str, fn(Option<&str>) -> Box) ] = &[ #[cfg(feature = "alsa-backend")] - ("alsa", &mk_sink::), + ("alsa", mk_sink::), #[cfg(feature = "portaudio-backend")] - ("portaudio", &mk_sink::), + ("portaudio", mk_sink::), #[cfg(feature = "pulseaudio-backend")] - ("pulseaudio", &mk_sink::), - ("pipe", &mk_sink::), + ("pulseaudio", mk_sink::), + ("pipe", mk_sink::), ]; } -pub fn find>(name: Option) -> Option<&'static (Fn(Option<&str>) -> Box + Send + Sync)> { +pub fn find>(name: Option) -> Option) -> Box> { if let Some(name) = name.as_ref().map(AsRef::as_ref) { BACKENDS.iter().find(|backend| name == backend.0).map(|backend| backend.1) } else {