mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-26 03:21:03 +00:00
examples/futures: Use future::pending() instead of future::empty()
It was renamed in the last release.
This commit is contained in:
parent
dda55616dd
commit
0bfa8fdcce
1 changed files with 2 additions and 1 deletions
|
@ -37,7 +37,8 @@ fn example_main() {
|
||||||
// We use an AbortHandle for having a Future that runs forever
|
// We use an AbortHandle for having a Future that runs forever
|
||||||
// until we call handle.abort() to quit our event loop
|
// until we call handle.abort() to quit our event loop
|
||||||
let (quit_handle, quit_registration) = future::AbortHandle::new_pair();
|
let (quit_handle, quit_registration) = future::AbortHandle::new_pair();
|
||||||
let quit_future = future::Abortable::new(future::empty::<()>(), quit_registration).map(|_| ());
|
let quit_future =
|
||||||
|
future::Abortable::new(future::pending::<()>(), quit_registration).map(|_| ());
|
||||||
|
|
||||||
// BusStream implements the Stream trait. Stream::for_each is calling a closure for each item
|
// BusStream implements the Stream trait. Stream::for_each is calling a closure for each item
|
||||||
// and returns a Future that resolves when the stream is done
|
// and returns a Future that resolves when the stream is done
|
||||||
|
|
Loading…
Reference in a new issue