Skip to content

Commit

Permalink
chore: short form
Browse files Browse the repository at this point in the history
  • Loading branch information
fundon committed Dec 22, 2023
1 parent 7285359 commit 468a571
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
26 changes: 12 additions & 14 deletions viz-core/src/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,10 @@ impl Body {
B::Data: Into<Bytes>,
B::Error: Into<BoxError>,
{
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`].
Expand All @@ -66,15 +65,14 @@ impl Body {
S::Ok: Into<Bytes>,
S::Error: Into<BoxError>,
{
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`].
Expand Down
2 changes: 1 addition & 1 deletion viz-core/src/handler/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion viz-tower/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 468a571

Please sign in to comment.