util: Revert "remove Encoder bound on FramedParts constructor" (#5450)

This reverts commit ae69d11d1f.
This commit is contained in:
Alice Ryhl
2023-02-12 11:55:41 +01:00
committed by GitHub
parent 01bb1ecf4d
commit 36fdccc3bc
+4 -1
View File
@@ -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,