mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-07 00:00:15 +02:00
Body: Implement From<()> (#2411)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user