Fix Send requirements for Wasm targets
This commit is contained in:
parent
a25b1af456
commit
b328da2c71
4 changed files with 7 additions and 7 deletions
|
|
@ -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 =
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue