fix: feature gates

This commit is contained in:
Ashley Wulber 2026-07-15 12:34:42 -04:00 • committed by Ashley Wulber
parent f6daee14ac
commit b3b0ab1cd5
26 changed files with 176 additions and 101 deletions

View file

@ -2,23 +2,23 @@
use std::fmt;
#[cfg(all(feature = "cctk", target_os = "linux"))]
#[cfg(wayland_platform)]
/// Platform specific actions defined for wayland
pub mod wayland;
/// Platform specific actions defined for wayland
pub enum Action {
/// Wayland Specific Actions
#[cfg(all(feature = "cctk", target_os = "linux"))]
#[cfg(wayland_platform)]
Wayland(wayland::Action),
}
impl fmt::Debug for Action {
fn fmt(&self, _f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
#[cfg(all(feature = "cctk", target_os = "linux"))]
#[cfg(wayland_platform)]
Action::Wayland(action) => action.fmt(_f),
#[cfg(not(all(feature = "cctk", target_os = "linux")))]
#[cfg(not(wayland_platform))]
_ => Ok(()),
}
}

View file

@ -222,7 +222,7 @@ pub fn frames() -> Subscription<(Id, Instant)> {
_ => None,
})
}
#[cfg(all(feature = "cctk", target_os = "linux"))]
#[cfg(wayland_platform)]
/// Subscribes to the frames of the window of the running application.
///
/// The resulting [`Subscription`] will produce items at a rate equal to the