Remove Compositor window generic

And update `glyphon` and `window_clipboard`
This commit is contained in:
Héctor Ramón Jiménez 2024-01-18 09:55:27 +01:00
parent 7289b6091b
commit 8bf2386972
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
18 changed files with 126 additions and 114 deletions

35
futures/src/maybe.rs Normal file
View file

@ -0,0 +1,35 @@
#[cfg(not(target_arch = "wasm32"))]
mod platform {
/// An extension trait that enforces `Send` only on native platforms.
///
/// Useful to write cross-platform async code!
pub trait MaybeSend: Send {}
impl<T> MaybeSend for T where T: Send {}
/// An extension trait that enforces `Sync` only on native platforms.
///
/// Useful to write cross-platform async code!
pub trait MaybeSync: Sync {}
impl<T> MaybeSync for T where T: Sync {}
}
#[cfg(target_arch = "wasm32")]
mod platform {
/// An extension trait that enforces `Send` only on native platforms.
///
/// Useful to write cross-platform async code!
pub trait MaybeSend {}
impl<T> MaybeSend for T {}
/// An extension trait that enforces `Send` only on native platforms.
///
/// Useful to write cross-platform async code!
pub trait MaybeSync {}
impl<T> MaybeSync for T {}
}
pub use platform::{MaybeSend, MaybeSync};