diff --git a/tokio/src/io/async_buf_read.rs b/tokio/src/io/async_buf_read.rs index 1ab73cd9b..1c1fae365 100644 --- a/tokio/src/io/async_buf_read.rs +++ b/tokio/src/io/async_buf_read.rs @@ -60,16 +60,14 @@ pub trait AsyncBufRead: AsyncRead { macro_rules! deref_async_buf_read { () => { - fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) - -> Poll> - { + fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { Pin::new(&mut **self.get_mut()).poll_fill_buf(cx) } fn consume(mut self: Pin<&mut Self>, amt: usize) { Pin::new(&mut **self).consume(amt) } - } + }; } impl AsyncBufRead for Box { diff --git a/tokio/src/io/async_read.rs b/tokio/src/io/async_read.rs index de08d6581..cc9091c99 100644 --- a/tokio/src/io/async_read.rs +++ b/tokio/src/io/async_read.rs @@ -140,12 +140,14 @@ macro_rules! deref_async_read { (**self).prepare_uninitialized_buffer(buf) } - fn poll_read(mut self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut [u8]) - -> Poll> - { + fn poll_read( + mut self: Pin<&mut Self>, + cx: &mut Context<'_>, + buf: &mut [u8], + ) -> Poll> { Pin::new(&mut **self).poll_read(cx, buf) } - } + }; } impl AsyncRead for Box { diff --git a/tokio/src/io/async_seek.rs b/tokio/src/io/async_seek.rs index 0be9c90d5..32ed0a22a 100644 --- a/tokio/src/io/async_seek.rs +++ b/tokio/src/io/async_seek.rs @@ -55,13 +55,10 @@ macro_rules! deref_async_seek { Pin::new(&mut **self).start_seek(cx, pos) } - fn poll_complete( - mut self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll> { + fn poll_complete(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { Pin::new(&mut **self).poll_complete(cx) } - } + }; } impl AsyncSeek for Box { diff --git a/tokio/src/io/async_write.rs b/tokio/src/io/async_write.rs index 014636395..ecf7575b1 100644 --- a/tokio/src/io/async_write.rs +++ b/tokio/src/io/async_write.rs @@ -153,9 +153,11 @@ pub trait AsyncWrite { macro_rules! deref_async_write { () => { - fn poll_write(mut self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8]) - -> Poll> - { + fn poll_write( + mut self: Pin<&mut Self>, + cx: &mut Context<'_>, + buf: &[u8], + ) -> Poll> { Pin::new(&mut **self).poll_write(cx, buf) } @@ -166,7 +168,7 @@ macro_rules! deref_async_write { fn poll_shutdown(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { Pin::new(&mut **self).poll_shutdown(cx) } - } + }; } impl AsyncWrite for Box { diff --git a/tokio/src/net/unix/listener.rs b/tokio/src/net/unix/listener.rs index 5acc1b7e8..9b76cb01f 100644 --- a/tokio/src/net/unix/listener.rs +++ b/tokio/src/net/unix/listener.rs @@ -3,7 +3,6 @@ use crate::io::PollEvented; use crate::net::unix::{Incoming, UnixStream}; use mio::Ready; -use mio_uds; use std::convert::TryFrom; use std::fmt; use std::io;