fix conditional compilation

This commit is contained in:
Ferdinand Schober
2024-07-12 18:18:46 +02:00
parent 7e77e0c3f5
commit f74b7f98fe
7 changed files with 21 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
#[cfg(all(unix, feature = "libei", not(target_os = "macos")))]
use ashpd::{desktop::ResponseError, Error::Response};
#[cfg(all(unix, feature = "libei", not(target_os = "macos")))]
use reis::tokio::EiConvertEventStreamError;
@@ -78,6 +79,7 @@ pub enum EmulationCreationError {
impl EmulationCreationError {
/// request was intentionally denied by the user
#[cfg(all(unix, feature = "libei", not(target_os = "macos")))]
pub(crate) fn cancelled_by_user(&self) -> bool {
matches!(
self,
@@ -88,6 +90,10 @@ impl EmulationCreationError {
)))
)
}
#[cfg(not(all(unix, feature = "libei", not(target_os = "macos"))))]
pub(crate) fn cancelled_by_user(&self) -> bool {
false
}
}
#[cfg(all(unix, feature = "wayland", not(target_os = "macos")))]

View File

@@ -295,4 +295,6 @@ impl InputEmulation for MacOSEmulation {
async fn create(&mut self, _handle: EmulationHandle) {}
async fn destroy(&mut self, _handle: EmulationHandle) {}
async fn terminate(&mut self) {}
}

View File

@@ -80,6 +80,8 @@ impl InputEmulation for WindowsEmulation {
async fn create(&mut self, _handle: EmulationHandle) {}
async fn destroy(&mut self, _handle: EmulationHandle) {}
async fn terminate(&mut self) {}
}
impl WindowsEmulation {