Skip to content

Commit

Permalink
util: Revert "remove Encoder bound on FramedParts constructor" (#…
Browse files Browse the repository at this point in the history
…5450)

This reverts commit ae69d11.
  • Loading branch information
Darksonn authored Feb 12, 2023
1 parent 01bb1ec commit 36fdccc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tokio-util/src/codec/framed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,10 @@ pub struct FramedParts<T, U> {

impl<T, U> FramedParts<T, U> {
/// Create a new, default, `FramedParts`
pub fn new(io: T, codec: U) -> FramedParts<T, U> {
pub fn new<I>(io: T, codec: U) -> FramedParts<T, U>
where
U: Encoder<I>,
{
FramedParts {
io,
codec,
Expand Down

0 comments on commit 36fdccc

Please sign in to comment.