summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2021-11-29 14:51:35 +0700
committerLibravatar GitHub <noreply@github.com>2021-11-29 14:51:35 +0700
commit96c7f9765c716dbe94d25f4961d07bc8e18a02c4 (patch)
tree7963a9dfa913736fcf849db38c666ce4b834e3bc /native
parentaeec0375f0897b2ef0897c4c54476b2d0db9311a (diff)
parent24d7d4740fd163b3d3f52fb8ea41233001ab6b93 (diff)
downloadiced-96c7f9765c716dbe94d25f4961d07bc8e18a02c4.tar.gz
iced-96c7f9765c716dbe94d25f4961d07bc8e18a02c4.tar.bz2
iced-96c7f9765c716dbe94d25f4961d07bc8e18a02c4.zip
Merge pull request #1118 from TannerRogalsky/native-web-fixes
Native web fixes.
Diffstat (limited to 'native')
-rw-r--r--native/src/subscription.rs4
-rw-r--r--native/src/subscription/events.rs9
2 files changed, 6 insertions, 7 deletions
diff --git a/native/src/subscription.rs b/native/src/subscription.rs
index ff954382..2950879c 100644
--- a/native/src/subscription.rs
+++ b/native/src/subscription.rs
@@ -1,7 +1,7 @@
//! Listen to external events in your application.
use crate::event::{self, Event};
use crate::Hasher;
-use iced_futures::futures::stream::BoxStream;
+use iced_futures::BoxStream;
/// A request to listen to external events.
///
@@ -21,7 +21,7 @@ pub type Subscription<T> =
/// A stream of runtime events.
///
/// It is the input of a [`Subscription`] in the native runtime.
-pub type EventStream = BoxStream<'static, (Event, event::Status)>;
+pub type EventStream = BoxStream<(Event, event::Status)>;
/// A native [`Subscription`] tracker.
pub type Tracker =
diff --git a/native/src/subscription/events.rs b/native/src/subscription/events.rs
index f689f3af..ca143bb3 100644
--- a/native/src/subscription/events.rs
+++ b/native/src/subscription/events.rs
@@ -27,10 +27,9 @@ where
self: Box<Self>,
event_stream: EventStream,
) -> BoxStream<Self::Output> {
- event_stream
- .filter_map(move |(event, status)| {
- future::ready((self.f)(event, status))
- })
- .boxed()
+ let stream = event_stream.filter_map(move |(event, status)| {
+ future::ready((self.f)(event, status))
+ });
+ iced_futures::boxed_stream(stream)
}
}