chore: fix lifetime related warning
Specify a hidden lifetime to remove a warning message. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
This commit is contained in:
committed by
ShadowCurse
parent
87d0d801a4
commit
5c2254d6cf
@@ -95,7 +95,7 @@ pub struct RequestLine {
|
|||||||
impl RequestLine {
|
impl RequestLine {
|
||||||
fn parse_request_line(
|
fn parse_request_line(
|
||||||
request_line: &[u8],
|
request_line: &[u8],
|
||||||
) -> std::result::Result<RequestLineParts, RequestError> {
|
) -> std::result::Result<RequestLineParts<'_>, RequestError> {
|
||||||
if let Some(method_end) = find(request_line, &[SP]) {
|
if let Some(method_end) = find(request_line, &[SP]) {
|
||||||
// The slice access is safe because `find` validates that `method_end` < `request_line` size.
|
// The slice access is safe because `find` validates that `method_end` < `request_line` size.
|
||||||
let method = &request_line[..method_end];
|
let method = &request_line[..method_end];
|
||||||
|
|||||||
Reference in New Issue
Block a user