mirror of
https://github.com/async-rs/async-std.git
synced 2025-01-16 10:49:55 +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 {
|
loop {
|
||||||
let event = select! {
|
let event = select! {
|
||||||
event = events.next() => match event {
|
event = events.next().fuse() => match event {
|
||||||
None => break, // 2
|
None => break, // 2
|
||||||
Some(event) => event,
|
Some(event) => event,
|
||||||
},
|
},
|
||||||
disconnect = disconnect_receiver.next() => {
|
disconnect = disconnect_receiver.next().fuse() => {
|
||||||
let (name, _pending_messages) = disconnect.unwrap(); // 3
|
let (name, _pending_messages) = disconnect.unwrap(); // 3
|
||||||
assert!(peers.remove(&name).is_some());
|
assert!(peers.remove(&name).is_some());
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue