From 7d0f9c7265ff7dbe99395c63ccd89043e0c37209 Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Fri, 28 Jun 2019 23:03:35 +0200 Subject: [PATCH] Remove unreachable_patterns gate onto relevant fns so all platforms benefit --- src/platform/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/platform/mod.rs b/src/platform/mod.rs index 976acd5..d64f1d2 100644 --- a/src/platform/mod.rs +++ b/src/platform/mod.rs @@ -256,6 +256,7 @@ macro_rules! impl_platform_host { type StreamId = StreamId; type Device = Device; + #[allow(unreachable_patterns)] fn build_input_stream( &self, device: &Self::Device, @@ -273,6 +274,7 @@ macro_rules! impl_platform_host { } } + #[allow(unreachable_patterns)] fn build_output_stream( &self, device: &Self::Device, @@ -290,6 +292,7 @@ macro_rules! impl_platform_host { } } + #[allow(unreachable_patterns)] fn play_stream(&self, stream: Self::StreamId) -> Result<(), crate::PlayStreamError> { match (&self.0, stream.0) { $( @@ -301,6 +304,7 @@ macro_rules! impl_platform_host { } } + #[allow(unreachable_patterns)] fn pause_stream(&self, stream: Self::StreamId) -> Result<(), crate::PauseStreamError> { match (&self.0, stream.0) { $( @@ -312,6 +316,7 @@ macro_rules! impl_platform_host { } } + #[allow(unreachable_patterns)] fn destroy_stream(&self, stream: Self::StreamId) { match (&self.0, stream.0) { $( @@ -521,8 +526,6 @@ mod platform_impl { // TODO: Add `Asio asio` once #221 lands. #[cfg(windows)] mod platform_impl { - #![allow(unreachable_patterns)] - #[cfg(feature = "asio")] pub use crate::host::asio::{ Device as AsioDevice,