chore: cargo fmt, clippy
This commit is contained in:
committed by
Sean McArthur
parent
e72d6dc189
commit
f46840f3fa
@@ -1,6 +1,6 @@
|
||||
use bytes::IntoBuf;
|
||||
use http::Request;
|
||||
use h2::client::{ResponseFuture, SendRequest};
|
||||
use http::Request;
|
||||
|
||||
/// Extend the `h2::client::SendRequest` type with convenience methods.
|
||||
pub trait SendRequestExt {
|
||||
@@ -22,7 +22,7 @@ where
|
||||
.expect("valid uri");
|
||||
|
||||
let (fut, _tx) = self
|
||||
.send_request(req, /*eos =*/true)
|
||||
.send_request(req, /*eos =*/ true)
|
||||
.expect("send_request");
|
||||
|
||||
fut
|
||||
|
||||
@@ -137,8 +137,7 @@ impl Mock<frame::Headers> {
|
||||
Mock(frame)
|
||||
}
|
||||
|
||||
pub fn scheme(self, value: &str) -> Self
|
||||
{
|
||||
pub fn scheme(self, value: &str) -> Self {
|
||||
let (id, mut pseudo, fields) = self.into_parts();
|
||||
let value = value.parse().unwrap();
|
||||
|
||||
@@ -206,7 +205,6 @@ impl From<Mock<frame::Data>> for SendFrame {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// PushPromise helpers
|
||||
|
||||
impl Mock<frame::PushPromise> {
|
||||
@@ -240,7 +238,6 @@ impl Mock<frame::PushPromise> {
|
||||
Mock(frame)
|
||||
}
|
||||
|
||||
|
||||
fn into_parts(self) -> (StreamId, StreamId, frame::Pseudo, HeaderMap) {
|
||||
assert!(self.0.is_end_headers(), "unset eoh will be lost");
|
||||
let id = self.0.stream_id();
|
||||
@@ -280,10 +277,7 @@ impl Mock<frame::GoAway> {
|
||||
}
|
||||
|
||||
pub fn reason(self, reason: frame::Reason) -> Self {
|
||||
Mock(frame::GoAway::new(
|
||||
self.0.last_stream_id(),
|
||||
reason,
|
||||
))
|
||||
Mock(frame::GoAway::new(self.0.last_stream_id(), reason))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user