Remove Compositor window generic
And update `glyphon` and `window_clipboard`
This commit is contained in:
parent
7289b6091b
commit
8bf2386972
18 changed files with 126 additions and 114 deletions
|
|
@ -15,7 +15,7 @@
|
|||
pub use futures;
|
||||
pub use iced_core as core;
|
||||
|
||||
mod maybe_send;
|
||||
mod maybe;
|
||||
mod runtime;
|
||||
|
||||
pub mod backend;
|
||||
|
|
@ -25,7 +25,7 @@ pub mod keyboard;
|
|||
pub mod subscription;
|
||||
|
||||
pub use executor::Executor;
|
||||
pub use maybe_send::MaybeSend;
|
||||
pub use maybe::{MaybeSend, MaybeSync};
|
||||
pub use platform::*;
|
||||
pub use runtime::Runtime;
|
||||
pub use subscription::Subscription;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,13 @@ mod platform {
|
|||
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")]
|
||||
|
|
@ -16,6 +23,13 @@ mod platform {
|
|||
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;
|
||||
pub use platform::{MaybeSend, MaybeSync};
|
||||
Loading…
Add table
Add a link
Reference in a new issue