Skip to content

Commit

Permalink
use Into<ResBody> to set response body (#828)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislearn committed Jul 4, 2024
1 parent b8370cb commit 51e44cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/core/src/http/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ impl Response {
}
/// Sets body.
#[inline]
pub fn body(&mut self, body: ResBody) -> &mut Self {
self.body = body;
pub fn body(&mut self, body: impl Into<ResBody>) -> &mut Self {
self.body = body.into();
self
}

Expand Down

0 comments on commit 51e44cd

Please sign in to comment.