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