Select wants a FusedFuture

pull/105/head
clemensw 5 years ago committed by GitHub
parent 794c12fe7e
commit de90104512
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save