Skip to content

Commit

Permalink
Implement Default for DecompressionBody
Browse files Browse the repository at this point in the history
  • Loading branch information
rtimush committed Jul 19, 2023
1 parent d042a2a commit 21aa172
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tower-http/src/decompression/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ pin_project! {
}
}

impl<B> Default for DecompressionBody<B>
where
B: Body + Default,
{
fn default() -> Self {
Self {
inner: BodyInner::Identity {
inner: B::default(),
},
}
}
}

impl<B> DecompressionBody<B>
where
B: Body,
Expand Down

0 comments on commit 21aa172

Please sign in to comment.