style(lib): use rust 2018 edition idioms (#1910)

This commit is contained in:
lzutao
2019-08-22 01:22:07 +07:00
committed by Sean McArthur
parent ae75b3a732
commit fc7f81b67c
38 changed files with 90 additions and 146 deletions

View File

@@ -7,7 +7,6 @@ use futures_core::{Stream, TryStream};
use futures_channel::{mpsc, oneshot};
use futures_util::TryStreamExt;
//use tokio_buf::SizeHint;
use h2;
use http::HeaderMap;
use crate::common::{Future, Never, Pin, Poll, task};
@@ -130,7 +129,6 @@ impl Body {
///
/// ```
/// # use hyper::Body;
/// # use futures_util;
/// # fn main() {
/// let chunks: Vec<Result<_, ::std::io::Error>> = vec![
/// Ok("hello"),
@@ -346,7 +344,7 @@ impl Payload for Body {
}
impl fmt::Debug for Body {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
#[derive(Debug)]
struct Streaming;
#[derive(Debug)]