Skip to content

Commit fa9b467

Browse files
committed
ICE in rustc
1 parent 72d5892 commit fa9b467

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/pharos.rs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,19 +255,26 @@ impl<Event> Sink<Event> for Pharos<Event> where Event: Clone + 'static + Send
255255
}
256256

257257

258+
let mut pending = false;
259+
260+
258261
let this = self.get_mut();
259262

260263
for (i, opt) in this.observers.iter_mut().enumerate()
261264
{
262265
if let Some( ref mut obs ) = opt
263266
{
264-
let res = ready!( Pin::new( obs ).poll_flush( cx ) );
265-
266-
if res.is_err()
267+
match Pin::new( obs ).poll_flush( cx )
267268
{
268-
this.free_slots.push( i );
269+
Poll::Pending => pending = true ,
270+
Poll::Ready(Ok()) => continue ,
269271

270-
*opt = None;
272+
Poll::Ready(Err(_)) =>
273+
{
274+
this.free_slots.push( i );
275+
276+
*opt = None;
277+
}
271278
}
272279
}
273280
}

0 commit comments

Comments
 (0)