summaryrefslogtreecommitdiffstats
path: root/futures/src/subscription/tracker.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-04 03:28:47 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-04 03:28:47 +0100
commit6d46833eb2a068bd3655859ea828dad04293e5ba (patch)
tree42cbe1d9a65a2e03e63887611251ed8532f49872 /futures/src/subscription/tracker.rs
parentf5186f31f1e5eed8fe20c5d6e62e2f531fee6365 (diff)
downloadiced-6d46833eb2a068bd3655859ea828dad04293e5ba.tar.gz
iced-6d46833eb2a068bd3655859ea828dad04293e5ba.tar.bz2
iced-6d46833eb2a068bd3655859ea828dad04293e5ba.zip
Support event subscriptions in `iced_web`
Also improves the overall web runtime, avoiding nested update loops.
Diffstat (limited to '')
-rw-r--r--futures/src/subscription/tracker.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/futures/src/subscription/tracker.rs b/futures/src/subscription/tracker.rs
index c8a1ee18..cfa36170 100644
--- a/futures/src/subscription/tracker.rs
+++ b/futures/src/subscription/tracker.rs
@@ -1,8 +1,7 @@
use crate::Subscription;
-use futures::{future::BoxFuture, sink::Sink};
-use std::collections::HashMap;
-use std::marker::PhantomData;
+use futures::{channel::mpsc, future::BoxFuture, sink::Sink};
+use std::{collections::HashMap, marker::PhantomData};
/// A registry of subscription streams.
///
@@ -64,7 +63,7 @@ where
where
Message: 'static + Send,
Receiver: 'static
- + Sink<Message, Error = core::convert::Infallible>
+ + Sink<Message, Error = mpsc::SendError>
+ Unpin
+ Send
+ Clone,