mirror of
https://github.com/tokio-rs/axum.git
synced 2024-11-21 22:56:46 +01:00
Body: Implement From<()>
(#2411)
This commit is contained in:
parent
f387c01f58
commit
212d959a54
2 changed files with 8 additions and 0 deletions
|
@ -84,6 +84,12 @@ impl Default for Body {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<()> for Body {
|
||||
fn from(_: ()) -> Self {
|
||||
Self::empty()
|
||||
}
|
||||
}
|
||||
|
||||
macro_rules! body_from_impl {
|
||||
($ty:ty) => {
|
||||
impl From<$ty> for Body {
|
||||
|
|
|
@ -7,9 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
# Unreleased
|
||||
|
||||
- **added:** `Body` implements `From<()>` now ([#2411])
|
||||
- **change:** Update version of multer used internally for multipart ([#2433])
|
||||
- **change:** Update tokio-tungstenite to 0.21 ([#2435])
|
||||
|
||||
[#2411]: https://github.com/tokio-rs/axum/pull/2411
|
||||
[#2433]: https://github.com/tokio-rs/axum/pull/2433
|
||||
[#2435]: https://github.com/tokio-rs/axum/pull/2435
|
||||
|
||||
|
|
Loading…
Reference in a new issue