From b8905bf2fcc3c743d8f9bebd3579928e7e91766c Mon Sep 17 00:00:00 2001 From: Rutger Broekhoff Date: Mon, 29 Apr 2024 18:15:16 +0200 Subject: Fix Clippy issues --- git-lfs-authenticate/src/main.rs | 2 +- server/src/main.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/git-lfs-authenticate/src/main.rs b/git-lfs-authenticate/src/main.rs index 3101c92..c9094a1 100644 --- a/git-lfs-authenticate/src/main.rs +++ b/git-lfs-authenticate/src/main.rs @@ -50,7 +50,7 @@ fn main() -> ExitCode { "expires_at": expires_at.to_rfc3339_opts(chrono::SecondsFormat::Secs, true), "href": format!("{}{}/info/lfs", config.href_base, repo_name), }); - println!("{}", response.to_string()); + println!("{}", response); ExitCode::SUCCESS } diff --git a/server/src/main.rs b/server/src/main.rs index 514be39..7371c0d 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -765,7 +765,7 @@ fn authorize_batch( if !verify_claims(conf, &claims, headers)? { return authorize_batch_unauthenticated(conf, public, operation, headers); } - return Ok(Trusted(true)); + Ok(Trusted(true)) } fn authorize_batch_unauthenticated( @@ -785,10 +785,10 @@ fn authorize_batch_unauthenticated( if !trusted { return Err(REPO_NOT_FOUND); } - return Err(make_error_resp( + Err(make_error_resp( StatusCode::FORBIDDEN, "Authentication required to upload", - )); + )) } common::Operation::Download => { // Again, trusted users can see all repos. For untrusted users, we first need to check @@ -800,7 +800,7 @@ fn authorize_batch_unauthenticated( } return Ok(Trusted(false)); } - return Ok(Trusted(true)); + Ok(Trusted(true)) } } } -- cgit v1.2.3