diff options
author | 2024-06-14 01:52:30 +0200 | |
---|---|---|
committer | 2024-06-14 01:52:30 +0200 | |
commit | b328da2c71e998e539bdc65815061e88dd1e7081 (patch) | |
tree | 0dbd05ccffd9a771e46e653ec4c364bf1e65cc8c /runtime | |
parent | a25b1af45690bdd8e1cbb20ee3a5b1c4342de455 (diff) | |
download | iced-b328da2c71e998e539bdc65815061e88dd1e7081.tar.gz iced-b328da2c71e998e539bdc65815061e88dd1e7081.tar.bz2 iced-b328da2c71e998e539bdc65815061e88dd1e7081.zip |
Fix `Send` requirements for Wasm targets
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/src/task.rs | 2 | ||||
-rw-r--r-- | runtime/src/window.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/runtime/src/task.rs b/runtime/src/task.rs index ac28a4e7..f3ddbca1 100644 --- a/runtime/src/task.rs +++ b/runtime/src/task.rs @@ -52,7 +52,7 @@ impl<T> Task<T> { /// its output. pub fn widget(operation: impl widget::Operation<T> + 'static) -> Task<T> where - T: MaybeSend + 'static, + T: Send + 'static, { Self::channel(move |sender| { let operation = diff --git a/runtime/src/window.rs b/runtime/src/window.rs index 0876ab69..59f285fd 100644 --- a/runtime/src/window.rs +++ b/runtime/src/window.rs @@ -7,7 +7,7 @@ use crate::core::time::Instant; use crate::core::window::{ Event, Icon, Id, Level, Mode, Settings, UserAttention, }; -use crate::core::{MaybeSend, Point, Size}; +use crate::core::{Point, Size}; use crate::futures::event; use crate::futures::futures::channel::oneshot; use crate::futures::Subscription; @@ -303,10 +303,10 @@ pub fn change_icon<T>(id: Id, icon: Icon) -> Task<T> { /// Note that if the window closes before this call is processed the callback will not be run. pub fn run_with_handle<T>( id: Id, - f: impl FnOnce(WindowHandle<'_>) -> T + MaybeSend + 'static, + f: impl FnOnce(WindowHandle<'_>) -> T + Send + 'static, ) -> Task<T> where - T: MaybeSend + 'static, + T: Send + 'static, { Task::oneshot(move |channel| { crate::Action::Window(Action::RunWithHandle( |