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:
David Pedersen
2021-11-01 22:37:16 +01:00
committed by GitHub
parent 9465128f3e
commit 3d07d40e02
13 changed files with 47 additions and 30 deletions
+2 -2
View File
@@ -29,8 +29,8 @@ bitflags = "1.0"
bytes = "1.0"
futures-util = { version = "0.3", default-features = false, features = ["alloc"] }
http = "0.2"
http-body = "0.4.3"
hyper = { version = "0.14", features = ["server", "tcp", "stream"] }
http-body = "0.4.4"
hyper = { version = "0.14.14", features = ["server", "tcp", "stream"] }
matchit = "0.4.4"
percent-encoding = "2.1"
pin-project-lite = "0.2.7"