fix(http): Adjust httparse Request and Response lifetimes.

This commit is contained in:
Jonathan Reem
2015-04-18 20:33:58 -07:00
parent d3b1c80bb5
commit 76550fdb20

View File

@@ -378,7 +378,7 @@ trait TryParse {
type TryParseResult<T> = Result<httparse::Status<(Incoming<T>, usize)>, HttpError>; 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); type Subject = (Method, RequestUri);
fn try_parse<'b>(headers: &'b mut [httparse::Header<'b>], buf: &'b [u8]) -> TryParseResult<(Method, RequestUri)> { fn try_parse<'b>(headers: &'b mut [httparse::Header<'b>], buf: &'b [u8]) -> TryParseResult<(Method, RequestUri)> {
@@ -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; type Subject = RawStatus;
fn try_parse<'b>(headers: &'b mut [httparse::Header<'b>], buf: &'b [u8]) -> TryParseResult<RawStatus> { fn try_parse<'b>(headers: &'b mut [httparse::Header<'b>], buf: &'b [u8]) -> TryParseResult<RawStatus> {