mirror of
https://github.com/async-rs/async-std.git
synced 2025-01-30 09:15:33 +00:00
Select wants a FusedFuture
This commit is contained in:
parent
794c12fe7e
commit
de90104512
1 changed files with 2 additions and 2 deletions
|
@ -219,11 +219,11 @@ async fn broker(mut events: Receiver<Event>) {
|
|||
|
||||
loop {
|
||||
let event = select! {
|
||||
event = events.next() => match event {
|
||||
event = events.next().fuse() => match event {
|
||||
None => break, // 2
|
||||
Some(event) => event,
|
||||
},
|
||||
disconnect = disconnect_receiver.next() => {
|
||||
disconnect = disconnect_receiver.next().fuse() => {
|
||||
let (name, _pending_messages) = disconnect.unwrap(); // 3
|
||||
assert!(peers.remove(&name).is_some());
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue