aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Rutger Broekhoff2024-04-29 18:15:16 +0200
committerLibravatar Rutger Broekhoff2024-04-29 18:15:16 +0200
commitb8905bf2fcc3c743d8f9bebd3579928e7e91766c (patch)
treea6a5ed3f8a30f1ad27ea9b31d7299332ae01cccf
parent2723f48c6fa1b26dc1b563fa68b130755a28387e (diff)
downloadgitolfs3-b8905bf2fcc3c743d8f9bebd3579928e7e91766c.tar.gz
gitolfs3-b8905bf2fcc3c743d8f9bebd3579928e7e91766c.zip
Fix Clippy issues
-rw-r--r--git-lfs-authenticate/src/main.rs2
-rw-r--r--server/src/main.rs8
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 {
50 "expires_at": expires_at.to_rfc3339_opts(chrono::SecondsFormat::Secs, true), 50 "expires_at": expires_at.to_rfc3339_opts(chrono::SecondsFormat::Secs, true),
51 "href": format!("{}{}/info/lfs", config.href_base, repo_name), 51 "href": format!("{}{}/info/lfs", config.href_base, repo_name),
52 }); 52 });
53 println!("{}", response.to_string()); 53 println!("{}", response);
54 54
55 ExitCode::SUCCESS 55 ExitCode::SUCCESS
56} 56}
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(
765 if !verify_claims(conf, &claims, headers)? { 765 if !verify_claims(conf, &claims, headers)? {
766 return authorize_batch_unauthenticated(conf, public, operation, headers); 766 return authorize_batch_unauthenticated(conf, public, operation, headers);
767 } 767 }
768 return Ok(Trusted(true)); 768 Ok(Trusted(true))
769} 769}
770 770
771fn authorize_batch_unauthenticated( 771fn authorize_batch_unauthenticated(
@@ -785,10 +785,10 @@ fn authorize_batch_unauthenticated(
785 if !trusted { 785 if !trusted {
786 return Err(REPO_NOT_FOUND); 786 return Err(REPO_NOT_FOUND);
787 } 787 }
788 return Err(make_error_resp( 788 Err(make_error_resp(
789 StatusCode::FORBIDDEN, 789 StatusCode::FORBIDDEN,
790 "Authentication required to upload", 790 "Authentication required to upload",
791 )); 791 ))
792 } 792 }
793 common::Operation::Download => { 793 common::Operation::Download => {
794 // Again, trusted users can see all repos. For untrusted users, we first need to check 794 // Again, trusted users can see all repos. For untrusted users, we first need to check
@@ -800,7 +800,7 @@ fn authorize_batch_unauthenticated(
800 } 800 }
801 return Ok(Trusted(false)); 801 return Ok(Trusted(false));
802 } 802 }
803 return Ok(Trusted(true)); 803 Ok(Trusted(true))
804 } 804 }
805 } 805 }
806} 806}