Use iced_futures utilities to make native work under wasm32 target.

This commit is contained in:
Tanner Rogalsky 2021-11-14 11:04:20 -05:00
parent 55eaeceec8
commit 24d7d4740f
2 changed files with 6 additions and 7 deletions

View file

@ -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)
}
}