Skip to content

Commit

Permalink
feat(request): add Request::body_mut() method
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Feb 24, 2018
1 parent 2f45d53 commit 3fa191a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/proto/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ impl<B> Request<B> {
#[inline]
pub fn body_ref(&self) -> Option<&B> { self.body.as_ref() }

/// Get a mutable reference to the Request body.
#[inline]
pub fn body_mut(&mut self) -> &mut Option<B> { &mut self.body }

#[doc(hidden)]
#[inline]
#[deprecated(since="0.11.12", note="This method will be gone in future versions.")]
Expand Down

0 comments on commit 3fa191a

Please sign in to comment.