style(lib): use rust 2018 edition idioms (#1910)
This commit is contained in:
@@ -17,7 +17,6 @@ use std::sync::Arc;
|
||||
|
||||
use bytes::Bytes;
|
||||
use futures_core::Stream;
|
||||
use h2;
|
||||
use pin_utils::{unsafe_pinned, unsafe_unpinned};
|
||||
use tokio_io::{AsyncRead, AsyncWrite};
|
||||
#[cfg(feature = "runtime")] use tokio_net::driver::Handle;
|
||||
@@ -666,7 +665,7 @@ impl<I, S> fmt::Debug for Connection<I, S>
|
||||
where
|
||||
S: Service<Body>,
|
||||
{
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("Connection")
|
||||
.finish()
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ where
|
||||
}
|
||||
|
||||
impl<I: fmt::Debug, S: fmt::Debug> fmt::Debug for Server<I, S> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("Server")
|
||||
.field("listener", &self.spawn_all.incoming_ref())
|
||||
.finish()
|
||||
|
||||
@@ -182,7 +182,7 @@ fn is_connection_error(e: &io::Error) -> bool {
|
||||
}
|
||||
|
||||
impl fmt::Debug for AddrIncoming {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("AddrIncoming")
|
||||
.field("addr", &self.addr)
|
||||
.field("sleep_on_errors", &self.sleep_on_errors)
|
||||
|
||||
Reference in New Issue
Block a user