mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-28 00:00:20 +02:00
Remove Sync requirement from response bodies (#440)
As we learned [in Tonic] bodies don't need to be `Sync` because they can only be polled from one thread at a time. This changes axum's bodies to no longer require `Sync` and makes `BoxBody` an alias for `UnsyncBoxBody<Bytes, axum::Error>`. [in Tonic]: https://github.com/hyperium/tonic/issues/117
This commit is contained in:
+2
-2
@@ -281,8 +281,8 @@ where
|
||||
S::Future: Send,
|
||||
T: 'static,
|
||||
ReqBody: Send + 'static,
|
||||
ResBody: http_body::Body<Data = Bytes> + Send + Sync + 'static,
|
||||
ResBody::Error: Into<BoxError> + Send + Sync + 'static,
|
||||
ResBody: http_body::Body<Data = Bytes> + Send + 'static,
|
||||
ResBody::Error: Into<BoxError>,
|
||||
{
|
||||
type Sealed = sealed::Hidden;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user