From e2ee96de60232b446cdae68d54f7f053554fa2c7 Mon Sep 17 00:00:00 2001 From: stammw Date: Fri, 19 Jul 2019 18:09:36 +0200 Subject: [PATCH] H3: Code reformatting from fmt update --- quinn-h3/examples/h3.rs | 1 - quinn-h3/src/body.rs | 10 +++------- quinn-h3/src/client.rs | 7 ++----- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/quinn-h3/examples/h3.rs b/quinn-h3/examples/h3.rs index 80dd2fd95..985fef586 100644 --- a/quinn-h3/examples/h3.rs +++ b/quinn-h3/examples/h3.rs @@ -328,7 +328,6 @@ enum ProcessResponseState { Finished, } - fn build_certs(log: Logger, options: Opt) -> Result<(CertificateChain, Certificate, PrivateKey)> { if let (Some(ref key_path), Some(ref cert_path)) = (options.key, options.cert) { let key = fs::read(key_path).context("failed to read private key")?; diff --git a/quinn-h3/src/body.rs b/quinn-h3/src/body.rs index f722f4be2..05fab8db7 100644 --- a/quinn-h3/src/body.rs +++ b/quinn-h3/src/body.rs @@ -11,7 +11,7 @@ use crate::{ connection::ConnectionRef, frame::FrameStream, headers::DecodeHeaders, - proto::frame::{DataFrame, HttpFrame, HeadersFrame}, + proto::frame::{DataFrame, HeadersFrame, HttpFrame}, try_take, Error, }; @@ -211,16 +211,12 @@ impl Stream for RecvBodyStream { fn poll(&mut self) -> Poll, Self::Error> { match try_ready!(self.recv.poll()) { - Some(HttpFrame::Data(d)) => { - Ok(Async::Ready(Some(d.payload))) - } + Some(HttpFrame::Data(d)) => Ok(Async::Ready(Some(d.payload))), Some(HttpFrame::Headers(d)) => { self.trailers = Some(d); Ok(Async::Ready(None)) } - None => { - Ok(Async::Ready(None)) - } + None => Ok(Async::Ready(None)), _ => Err(Error::peer("invalid frame type in data")), } } diff --git a/quinn-h3/src/client.rs b/quinn-h3/src/client.rs index 256b0d69c..74a5be250 100644 --- a/quinn-h3/src/client.rs +++ b/quinn-h3/src/client.rs @@ -10,14 +10,11 @@ use slog::{self, o, Logger}; use tokio_io::io::{Shutdown, WriteAll}; use crate::{ - body::{Body, RecvBody, SendBody, RecvBodyStream}, + body::{Body, RecvBody, RecvBodyStream, SendBody}, connection::{ConnectionDriver, ConnectionRef}, frame::{FrameDecoder, FrameStream}, headers::DecodeHeaders, - proto::{ - frame::HttpFrame, - headers::Header, - }, + proto::{frame::HttpFrame, headers::Header}, try_take, Error, Settings, };