From 36fdccc3bcaad6d5ff5a046ce5b4e28a5e23dfd3 Mon Sep 17 00:00:00 2001 From: Alice Ryhl Date: Sun, 12 Feb 2023 11:55:41 +0100 Subject: [PATCH] util: Revert "remove `Encoder` bound on `FramedParts` constructor" (#5450) This reverts commit ae69d11d1f9f17c536f35369ab597cebb4bd0159. --- tokio-util/src/codec/framed.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tokio-util/src/codec/framed.rs b/tokio-util/src/codec/framed.rs index 043b43841..8a344f90d 100644 --- a/tokio-util/src/codec/framed.rs +++ b/tokio-util/src/codec/framed.rs @@ -368,7 +368,10 @@ pub struct FramedParts { impl FramedParts { /// Create a new, default, `FramedParts` - pub fn new(io: T, codec: U) -> FramedParts { + pub fn new(io: T, codec: U) -> FramedParts + where + U: Encoder, + { FramedParts { io, codec,