fix linter errors

This commit is contained in:
Zachary Kohnen 2020-10-26 15:33:47 -04:00
parent 4107763bc8
commit b5e83256d9
No known key found for this signature in database
GPG Key ID: BBCD8EBC910EB8AA
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ impl rocket::handler::Handler for FairingErrorRoute {
error_!("Fairing Error Handling Route error: {:?}", e);
500
});
let status = Status::from_code(status).unwrap_or_else(|| Status::InternalServerError);
let status = Status::from_code(status).unwrap_or(Status::InternalServerError);
Outcome::Failure(status)
}
}

View File

@ -1816,7 +1816,7 @@ fn preflight_validate(
// do not set any additional headers and terminate this set of steps.
// The request is outside the scope of this specification.
let method = method.as_ref().ok_or_else(|| Error::MissingRequestMethod)?;
let method = method.as_ref().ok_or(Error::MissingRequestMethod)?;
// 4. Let header field-names be the values as result of parsing the
// Access-Control-Request-Headers headers.