fix style to match crate
This commit is contained in:
@@ -12,7 +12,7 @@ pub const SETTINGS_ACK: &'static [u8] = &[0, 0, 0, 4, 1, 0, 0, 0, 0];
|
|||||||
// ==== helper functions to easily construct h2 Frames ====
|
// ==== helper functions to easily construct h2 Frames ====
|
||||||
|
|
||||||
pub fn headers<T>(id: T) -> MockHeaders
|
pub fn headers<T>(id: T) -> MockHeaders
|
||||||
where T: Into<StreamId>,
|
where T: Into<StreamId>,
|
||||||
{
|
{
|
||||||
MockHeaders(frame::Headers::new(
|
MockHeaders(frame::Headers::new(
|
||||||
id.into(),
|
id.into(),
|
||||||
@@ -22,14 +22,14 @@ where T: Into<StreamId>,
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn data<T, B>(id: T, buf: B) -> MockData
|
pub fn data<T, B>(id: T, buf: B) -> MockData
|
||||||
where T: Into<StreamId>,
|
where T: Into<StreamId>,
|
||||||
B: Into<Bytes>,
|
B: Into<Bytes>,
|
||||||
{
|
{
|
||||||
MockData(frame::Data::new(id.into(), buf.into()))
|
MockData(frame::Data::new(id.into(), buf.into()))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn window_update<T>(id: T, sz: u32) -> frame::WindowUpdate
|
pub fn window_update<T>(id: T, sz: u32) -> frame::WindowUpdate
|
||||||
where T: Into<StreamId>,
|
where T: Into<StreamId>,
|
||||||
{
|
{
|
||||||
frame::WindowUpdate::new(id.into(), sz)
|
frame::WindowUpdate::new(id.into(), sz)
|
||||||
}
|
}
|
||||||
@@ -148,7 +148,7 @@ pub trait HttpTryInto<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<T, U> HttpTryInto<T> for U
|
impl<T, U> HttpTryInto<T> for U
|
||||||
where T: HttpTryFrom<U>,
|
where T: HttpTryFrom<U>,
|
||||||
T::Error: fmt::Debug,
|
T::Error: fmt::Debug,
|
||||||
{
|
{
|
||||||
type Error = T::Error;
|
type Error = T::Error;
|
||||||
|
|||||||
Reference in New Issue
Block a user