mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
codec: remove unnecessary trait bounds on all Framed constructors (#7716)
This commit is contained in:
@@ -41,10 +41,7 @@ pin_project! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T, U> Framed<T, U>
|
impl<T, U> Framed<T, U> {
|
||||||
where
|
|
||||||
T: AsyncRead + AsyncWrite,
|
|
||||||
{
|
|
||||||
/// Provides a [`Stream`] and [`Sink`] interface for reading and writing to this
|
/// Provides a [`Stream`] and [`Sink`] interface for reading and writing to this
|
||||||
/// I/O object, using [`Decoder`] and [`Encoder`] to read and write the raw data.
|
/// I/O object, using [`Decoder`] and [`Encoder`] to read and write the raw data.
|
||||||
///
|
///
|
||||||
@@ -127,9 +124,7 @@ where
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
impl<T, U> Framed<T, U> {
|
|
||||||
/// Provides a [`Stream`] and [`Sink`] interface for reading and writing to this
|
/// Provides a [`Stream`] and [`Sink`] interface for reading and writing to this
|
||||||
/// I/O object, using [`Decoder`] and [`Encoder`] to read and write the raw data.
|
/// I/O object, using [`Decoder`] and [`Encoder`] to read and write the raw data.
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -36,11 +36,7 @@ pin_project! {
|
|||||||
|
|
||||||
// ===== impl FramedRead =====
|
// ===== impl FramedRead =====
|
||||||
|
|
||||||
impl<T, D> FramedRead<T, D>
|
impl<T, D> FramedRead<T, D> {
|
||||||
where
|
|
||||||
T: AsyncRead,
|
|
||||||
D: Decoder,
|
|
||||||
{
|
|
||||||
/// Creates a new `FramedRead` with the given `decoder`.
|
/// Creates a new `FramedRead` with the given `decoder`.
|
||||||
pub fn new(inner: T, decoder: D) -> FramedRead<T, D> {
|
pub fn new(inner: T, decoder: D) -> FramedRead<T, D> {
|
||||||
FramedRead {
|
FramedRead {
|
||||||
@@ -68,9 +64,7 @@ where
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
impl<T, D> FramedRead<T, D> {
|
|
||||||
/// Returns a reference to the underlying I/O stream wrapped by
|
/// Returns a reference to the underlying I/O stream wrapped by
|
||||||
/// `FramedRead`.
|
/// `FramedRead`.
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -35,10 +35,7 @@ pin_project! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T, E> FramedWrite<T, E>
|
impl<T, E> FramedWrite<T, E> {
|
||||||
where
|
|
||||||
T: AsyncWrite,
|
|
||||||
{
|
|
||||||
/// Creates a new `FramedWrite` with the given `encoder`.
|
/// Creates a new `FramedWrite` with the given `encoder`.
|
||||||
pub fn new(inner: T, encoder: E) -> FramedWrite<T, E> {
|
pub fn new(inner: T, encoder: E) -> FramedWrite<T, E> {
|
||||||
FramedWrite {
|
FramedWrite {
|
||||||
@@ -64,9 +61,7 @@ where
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
impl<T, E> FramedWrite<T, E> {
|
|
||||||
/// Returns a reference to the underlying I/O stream wrapped by
|
/// Returns a reference to the underlying I/O stream wrapped by
|
||||||
/// `FramedWrite`.
|
/// `FramedWrite`.
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user