summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-06-14 01:52:30 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-06-14 01:52:30 +0200
commitb328da2c71e998e539bdc65815061e88dd1e7081 (patch)
tree0dbd05ccffd9a771e46e653ec4c364bf1e65cc8c /runtime
parenta25b1af45690bdd8e1cbb20ee3a5b1c4342de455 (diff)
downloadiced-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.rs2
-rw-r--r--runtime/src/window.rs6
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(