sync: change oneshot poll_close to poll_closed

The action of `Sender::poll_close` is to check if the receiver has been
closed, not to try to close the sender itself. So change to
`poll_closed`.
This commit is contained in:
Sean McArthur
2019-06-27 13:56:58 -07:00
parent ff906acdfb
commit e4415d986a
3 changed files with 19 additions and 19 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ impl<'a> Future for OnClose<'a> {
type Output = ();
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()> {
self.get_mut().tx.poll_close(cx)
self.get_mut().tx.poll_closed(cx)
}
}