Skip to content

Commit

Permalink
fix(http): Adjust httparse Request and Response lifetimes.
Browse files Browse the repository at this point in the history
  • Loading branch information
reem committed Apr 19, 2015
1 parent d3b1c80 commit 76550fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ trait TryParse {

type TryParseResult<T> = Result<httparse::Status<(Incoming<T>, usize)>, HttpError>;

impl<'a> TryParse for httparse::Request<'a> {
impl<'a> TryParse for httparse::Request<'a, 'a> {
type Subject = (Method, RequestUri);

fn try_parse<'b>(headers: &'b mut [httparse::Header<'b>], buf: &'b [u8]) -> TryParseResult<(Method, RequestUri)> {
Expand All @@ -399,7 +399,7 @@ impl<'a> TryParse for httparse::Request<'a> {
}
}

impl<'a> TryParse for httparse::Response<'a> {
impl<'a> TryParse for httparse::Response<'a, 'a> {
type Subject = RawStatus;

fn try_parse<'b>(headers: &'b mut [httparse::Header<'b>], buf: &'b [u8]) -> TryParseResult<RawStatus> {
Expand Down

0 comments on commit 76550fd

Please sign in to comment.