From b5e83256d98ea51d8eb16ed9cab7f0e2772ce1a1 Mon Sep 17 00:00:00 2001 From: Zachary Kohnen <14093962+DusterTheFirst@users.noreply.github.com> Date: Mon, 26 Oct 2020 15:33:47 -0400 Subject: [PATCH] fix linter errors --- src/fairing.rs | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fairing.rs b/src/fairing.rs index a6362da..e3e2099 100644 --- a/src/fairing.rs +++ b/src/fairing.rs @@ -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) } } diff --git a/src/lib.rs b/src/lib.rs index c0ef63e..0cb89ff 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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.