Merge pull request #469 from reem/fix-httparse-lifetimes

fix(http): Adjust httparse Request and Response lifetimes.
This commit is contained in:
Sean McArthur
2015-04-18 20:38:30 -07:00

View File

@@ -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)> {
@@ -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> {