Skip to content

Commit 76550fd

Browse files
committed
fix(http): Adjust httparse Request and Response lifetimes.
1 parent d3b1c80 commit 76550fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/http.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ trait TryParse {
378378

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

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

384384
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> {
399399
}
400400
}
401401

402-
impl<'a> TryParse for httparse::Response<'a> {
402+
impl<'a> TryParse for httparse::Response<'a, 'a> {
403403
type Subject = RawStatus;
404404

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

0 commit comments

Comments
 (0)