diff --git a/debug/src/lib.rs b/debug/src/lib.rs index f79dde55..e20c00e6 100644 --- a/debug/src/lib.rs +++ b/debug/src/lib.rs @@ -413,7 +413,7 @@ mod internal { } } -#[cfg(feature = "hot")] +#[cfg(all(feature = "hot", not(target_arch = "wasm32")))] mod hot { use std::collections::BTreeSet; use std::sync::atomic::{self, AtomicBool}; @@ -478,7 +478,7 @@ mod hot { } } -#[cfg(not(feature = "hot"))] +#[cfg(any(not(feature = "hot"), target_arch = "wasm32"))] mod hot { pub fn init() {} @@ -486,7 +486,7 @@ mod hot { f() } - pub fn on_hotpatch(_f: impl Fn() + Send + Sync + 'static) {} + pub fn on_hotpatch(_f: impl Fn()) {} pub fn is_stale() -> bool { false diff --git a/program/src/lib.rs b/program/src/lib.rs index 0e473c3a..3c49659f 100644 --- a/program/src/lib.rs +++ b/program/src/lib.rs @@ -15,7 +15,7 @@ use crate::core::text; use crate::core::theme; use crate::core::window; use crate::core::{Element, Font, Settings}; -use crate::futures::{Executor, MaybeSend, Subscription}; +use crate::futures::{Executor, Subscription}; use crate::graphics::compositor; use crate::runtime::Task; @@ -29,7 +29,7 @@ pub trait Program: Sized { type State; /// The message of the program. - type Message: MaybeSend + 'static; + type Message: Send + 'static; /// The theme of the program. type Theme: Default + theme::Base; diff --git a/src/application.rs b/src/application.rs index 38d95f79..e2de21b5 100644 --- a/src/application.rs +++ b/src/application.rs @@ -36,8 +36,7 @@ use crate::shell; use crate::theme; use crate::window; use crate::{ - Element, Executor, Font, MaybeSend, Preset, Result, Settings, Size, - Subscription, Task, + Element, Executor, Font, Preset, Result, Settings, Size, Subscription, Task, }; use iced_debug as debug; @@ -83,7 +82,7 @@ pub fn application( ) -> Application> where State: 'static, - Message: MaybeSend + 'static, + Message: Send + 'static, Theme: Default + theme::Base, Renderer: program::Renderer, { @@ -102,7 +101,7 @@ where impl Program for Instance where - Message: MaybeSend + 'static, + Message: Send + 'static, Theme: Default + theme::Base, Renderer: program::Renderer, Boot: self::Boot, @@ -201,7 +200,7 @@ impl Application

{ #[cfg(all(feature = "debug", not(feature = "tester")))] let program = iced_devtools::attach(self); - #[cfg(any(not(feature = "debug"), target_arch = "wasm32"))] + #[cfg(not(any(feature = "tester", feature = "debug")))] let program = self; Ok(shell::run(program)?) diff --git a/src/daemon.rs b/src/daemon.rs index c848d8bd..c58d8033 100644 --- a/src/daemon.rs +++ b/src/daemon.rs @@ -6,8 +6,7 @@ use crate::shell; use crate::theme; use crate::window; use crate::{ - Element, Executor, Font, MaybeSend, Preset, Result, Settings, Subscription, - Task, + Element, Executor, Font, Preset, Result, Settings, Subscription, Task, }; use iced_debug as debug; @@ -31,7 +30,7 @@ pub fn daemon( ) -> Daemon> where State: 'static, - Message: MaybeSend + 'static, + Message: Send + 'static, Theme: Default + theme::Base, Renderer: program::Renderer, { @@ -50,7 +49,7 @@ where impl Program for Instance where - Message: MaybeSend + 'static, + Message: Send + 'static, Theme: Default + theme::Base, Renderer: program::Renderer, Boot: application::Boot, diff --git a/src/lib.rs b/src/lib.rs index e4cc8807..d2772e62 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -528,7 +528,6 @@ pub use crate::core::{ pub use crate::program::Preset; pub use crate::program::message; pub use crate::runtime::exit; -pub use crate::runtime::futures::MaybeSend; pub use iced_futures::Subscription; pub use Alignment::Center; @@ -698,7 +697,7 @@ pub fn run( ) -> Result where State: Default + 'static, - Message: MaybeSend + message::MaybeDebug + message::MaybeClone + 'static, + Message: Send + message::MaybeDebug + message::MaybeClone + 'static, Theme: Default + theme::Base + 'static, Renderer: program::Renderer + 'static, { diff --git a/winit/src/proxy.rs b/winit/src/proxy.rs index ef3ecec7..92758c5f 100644 --- a/winit/src/proxy.rs +++ b/winit/src/proxy.rs @@ -77,10 +77,7 @@ impl Proxy { /// /// Note: This skips the backpressure mechanism with an unbounded /// channel. Use sparingly! - pub fn send(&self, value: T) - where - T: std::fmt::Debug, - { + pub fn send(&self, value: T) { self.send_action(Action::Output(value)); }