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,