Skip to content

Commit

Permalink
ICE in rustc
Browse files Browse the repository at this point in the history
  • Loading branch information
najamelan committed Sep 24, 2019
1 parent 72d5892 commit fa9b467
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/pharos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,19 +255,26 @@ impl<Event> Sink<Event> for Pharos<Event> where Event: Clone + 'static + Send
}


let mut pending = false;


let this = self.get_mut();

for (i, opt) in this.observers.iter_mut().enumerate()
{
if let Some( ref mut obs ) = opt
{
let res = ready!( Pin::new( obs ).poll_flush( cx ) );

if res.is_err()
match Pin::new( obs ).poll_flush( cx )
{
this.free_slots.push( i );
Poll::Pending => pending = true ,
Poll::Ready(Ok()) => continue ,

*opt = None;
Poll::Ready(Err(_)) =>
{
this.free_slots.push( i );

*opt = None;
}
}
}
}
Expand Down

0 comments on commit fa9b467

Please sign in to comment.