mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-28 00:00:20 +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 {
|
||||
|
||||
Reference in New Issue
Block a user