mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-19 01:36:08 +00:00
H3: Code reformatting from fmt update
This commit is contained in:
committed by
Benjamin Saunders
parent
f173375cbc
commit
e2ee96de60
@@ -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")?;
|
||||
|
||||
@@ -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<Option<Self::Item>, 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")),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user