Skip to content

Commit

Permalink
Use set() over take() to ensure sink is dropped
Browse files Browse the repository at this point in the history
  • Loading branch information
ebkalderon committed Feb 15, 2019
1 parent 21f45bd commit adedad1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion futures-util/src/stream/forward.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ where
Poll::Ready(None) => {
try_ready!(self.as_mut().sink().as_pin_mut().expect(INVALID_POLL)
.poll_flush(lw));
let _ = self.as_mut().sink().as_pin_mut().take().unwrap();
self.as_mut().sink().set(None);
return Poll::Ready(Ok(()))
}
Poll::Pending => {
Expand Down

0 comments on commit adedad1

Please sign in to comment.