diff --git a/viz-core/src/body.rs b/viz-core/src/body.rs index bcc504a8..e7ae63f7 100644 --- a/viz-core/src/body.rs +++ b/viz-core/src/body.rs @@ -52,11 +52,10 @@ impl Body { B::Data: Into, B::Error: Into, { - Self::Boxed(SyncWrapper::new( - body.map_frame(|frame| frame.map_data(Into::into)) - .map_err(Error::boxed) - .boxed_unsync(), - )) + body.map_frame(|frame| frame.map_data(Into::into)) + .map_err(Error::boxed) + .boxed_unsync() + .into() } /// A body created from a [`Stream`]. @@ -66,15 +65,14 @@ impl Body { S::Ok: Into, S::Error: Into, { - Self::Boxed(SyncWrapper::new( - StreamBody::new( - stream - .map_ok(Into::into) - .map_ok(Frame::data) - .map_err(Error::boxed), - ) - .boxed_unsync(), - )) + StreamBody::new( + stream + .map_ok(Into::into) + .map_ok(Frame::data) + .map_err(Error::boxed), + ) + .boxed_unsync() + .into() } /// A stream created from a [`http_body::Body`]. diff --git a/viz-core/src/handler/service.rs b/viz-core/src/handler/service.rs index 258570b0..5c7a3121 100644 --- a/viz-core/src/handler/service.rs +++ b/viz-core/src/handler/service.rs @@ -38,8 +38,8 @@ where body.map_frame(|f| f.map_data(Into::into)) .map_err(Into::into) .boxed_unsync() + .into() }) - .map(Into::into) }) .map_err(Into::into) } diff --git a/viz-tower/src/lib.rs b/viz-tower/src/lib.rs index 62baead6..8ce1c1f6 100644 --- a/viz-tower/src/lib.rs +++ b/viz-tower/src/lib.rs @@ -37,8 +37,8 @@ where body.map_frame(|f| f.map_data(Into::into)) .map_err(Error::boxed) .boxed_unsync() + .into() }) - .map(Into::into) }) .map_err(Error::boxed) }