Fix clippy warnings
All checks were successful
Core Repos/ImageApi/pipeline/head This commit looks good

This commit is contained in:
Cameron Cordes
2021-02-03 17:21:23 -05:00
parent e46abbf8ee
commit 659bad02c9
2 changed files with 2 additions and 2 deletions

View File

@@ -48,7 +48,7 @@ impl FromRequest for Claims {
fn from_request(req: &HttpRequest, _payload: &mut dev::Payload) -> Self::Future { fn from_request(req: &HttpRequest, _payload: &mut dev::Payload) -> Self::Future {
let claims = match req.headers().get(header::AUTHORIZATION) { let claims = match req.headers().get(header::AUTHORIZATION) {
Some(header) => Claims::from_str(header.to_str().unwrap_or_else(|_| "")), Some(header) => Claims::from_str(header.to_str().unwrap_or("")),
None => Err(jsonwebtoken::errors::Error::from( None => Err(jsonwebtoken::errors::Error::from(
jsonwebtoken::errors::ErrorKind::InvalidToken, jsonwebtoken::errors::ErrorKind::InvalidToken,
)), )),

View File

@@ -27,7 +27,7 @@ fn is_image_or_video(path: &Path) -> bool {
.extension() .extension()
.unwrap_or_else(|| OsStr::new("")) .unwrap_or_else(|| OsStr::new(""))
.to_str() .to_str()
.unwrap_or_else(|| "") .unwrap_or("")
.to_lowercase(); .to_lowercase();
extension == "png" extension == "png"