mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-07 20:09:59 +03:00
fix conditional compilation
This commit is contained in:
@@ -87,19 +87,25 @@ pub enum EmulationCreationError {
|
|||||||
|
|
||||||
impl EmulationCreationError {
|
impl EmulationCreationError {
|
||||||
/// request was intentionally denied by the user
|
/// request was intentionally denied by the user
|
||||||
#[cfg(all(unix, feature = "libei", not(target_os = "macos")))]
|
|
||||||
pub(crate) fn cancelled_by_user(&self) -> bool {
|
pub(crate) fn cancelled_by_user(&self) -> bool {
|
||||||
matches!(
|
#[cfg(feature = "libei")]
|
||||||
|
if matches!(
|
||||||
self,
|
self,
|
||||||
EmulationCreationError::Libei(LibeiEmulationCreationError::Ashpd(Response(
|
EmulationCreationError::Libei(LibeiEmulationCreationError::Ashpd(Response(
|
||||||
ResponseError::Cancelled,
|
ResponseError::Cancelled,
|
||||||
))) | EmulationCreationError::Xdp(XdpEmulationCreationError::Ashpd(Response(
|
)))
|
||||||
|
) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
#[cfg(feature = "xdg_desktop_portal")]
|
||||||
|
if matches!(
|
||||||
|
self,
|
||||||
|
EmulationCreationError::Xdp(XdpEmulationCreationError::Ashpd(Response(
|
||||||
ResponseError::Cancelled,
|
ResponseError::Cancelled,
|
||||||
)))
|
)))
|
||||||
)
|
) {
|
||||||
}
|
return true;
|
||||||
#[cfg(not(all(unix, feature = "libei", not(target_os = "macos"))))]
|
}
|
||||||
pub(crate) fn cancelled_by_user(&self) -> bool {
|
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user