fix macos build error

This commit is contained in:
Ferdinand Schober
2024-07-30 11:11:45 +02:00
parent de3167221c
commit e1096ae86c

View File

@@ -88,7 +88,7 @@ pub enum EmulationCreationError {
impl EmulationCreationError { impl EmulationCreationError {
/// request was intentionally denied by the user /// request was intentionally denied by the user
pub(crate) fn cancelled_by_user(&self) -> bool { pub(crate) fn cancelled_by_user(&self) -> bool {
#[cfg(feature = "libei")] #[cfg(all(unix, feature = "libei", not(target_os = "macos")))]
if matches!( if matches!(
self, self,
EmulationCreationError::Libei(LibeiEmulationCreationError::Ashpd(Response( EmulationCreationError::Libei(LibeiEmulationCreationError::Ashpd(Response(
@@ -97,7 +97,7 @@ impl EmulationCreationError {
) { ) {
return true; return true;
} }
#[cfg(feature = "xdg_desktop_portal")] #[cfg(all(unix, feature = "xdg_desktop_portal", not(target_os = "macos")))]
if matches!( if matches!(
self, self,
EmulationCreationError::Xdp(XdpEmulationCreationError::Ashpd(Response( EmulationCreationError::Xdp(XdpEmulationCreationError::Ashpd(Response(