Skip to content

Commit 28ab681

Browse files
committed
Use set() over take() to ensure sink is dropped
1 parent 755804c commit 28ab681

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

futures-util/src/stream/forward.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ where
8585
Poll::Ready(None) => {
8686
try_ready!(self.as_mut().sink().as_pin_mut().expect(INVALID_POLL)
8787
.poll_close(waker));
88-
let _ = self.as_mut().sink().as_pin_mut().take().unwrap();
88+
self.as_mut().sink().set(None);
8989
return Poll::Ready(Ok(()))
9090
}
9191
Poll::Pending => {

0 commit comments

Comments
 (0)