From c783194e8b8c3263fad579a85ea07d62e63b16be Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Tue, 9 May 2023 20:49:34 +0100 Subject: *: apply clippy recommendations. --- src/api/admin/api_server.rs | 2 +- src/api/admin/bucket.rs | 4 ++-- src/api/admin/key.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/api/admin') diff --git a/src/api/admin/api_server.rs b/src/api/admin/api_server.rs index 58dd38d8..b0dfdfb7 100644 --- a/src/api/admin/api_server.rs +++ b/src/api/admin/api_server.rs @@ -105,7 +105,7 @@ impl AdminApiServer { let bucket_id = self .garage .bucket_helper() - .resolve_global_bucket_name(&domain) + .resolve_global_bucket_name(domain) .await? .ok_or(HelperError::NoSuchBucket(domain.to_string()))?; diff --git a/src/api/admin/bucket.rs b/src/api/admin/bucket.rs index e60f07ca..f0a4a9e7 100644 --- a/src/api/admin/bucket.rs +++ b/src/api/admin/bucket.rs @@ -183,8 +183,8 @@ async fn bucket_info_results( } }), keys: relevant_keys - .into_iter() - .map(|(_, key)| { + .into_values() + .map(|key| { let p = key.state.as_option().unwrap(); GetBucketInfoKey { access_key_id: key.key_id, diff --git a/src/api/admin/key.rs b/src/api/admin/key.rs index 2bbabb7b..d74ca361 100644 --- a/src/api/admin/key.rs +++ b/src/api/admin/key.rs @@ -183,8 +183,8 @@ async fn key_info_results(garage: &Arc, key: Key) -> Result