Update protocols/noise/src/io.rs

Co-Authored-By: Toralf Wittner <tw@dtex.org>
This commit is contained in:
Pierre Krieger 2019-12-11 17:42:24 +01:00 committed by GitHub
parent 3f1cbaa3a8
commit d0032702f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -424,7 +424,7 @@ impl<T: AsyncWrite + Unpin> AsyncWrite for NoiseOutput<T> {
mut self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), std::io::Error>>{
ready!(Pin::new(&mut *self).poll_flush(cx))?;
ready!(self.as_mut().poll_flush(cx))?;
Pin::new(&mut self.io).poll_close(cx)
}