From 89354ca7c3a66e05cefad77bd6350c8fad7b58bd Mon Sep 17 00:00:00 2001 From: Raphael Taylor-Davies <1781103+tustvold@users.noreply.github.com> Date: Fri, 16 Dec 2022 19:27:12 +0000 Subject: [PATCH] More clippy lint fixes (#3355) --- object_store/src/aws/client.rs | 2 +- object_store/src/azure/client.rs | 2 +- object_store/src/azure/credential.rs | 2 +- object_store/src/local.rs | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/object_store/src/aws/client.rs b/object_store/src/aws/client.rs index ccc0a9c6bbc0..d2d2aefa4b7f 100644 --- a/object_store/src/aws/client.rs +++ b/object_store/src/aws/client.rs @@ -131,7 +131,7 @@ impl TryFrom for ListResult { let common_prefixes = value .common_prefixes .into_iter() - .map(|x| Ok(Path::parse(&x.prefix)?)) + .map(|x| Ok(Path::parse(x.prefix)?)) .collect::>()?; let objects = value diff --git a/object_store/src/azure/client.rs b/object_store/src/azure/client.rs index b537f5edf679..fedd85e3dc30 100644 --- a/object_store/src/azure/client.rs +++ b/object_store/src/azure/client.rs @@ -407,7 +407,7 @@ impl TryFrom for ListResult { .blob_prefix .unwrap_or_default() .into_iter() - .map(|x| Ok(Path::parse(&x.name)?)) + .map(|x| Ok(Path::parse(x.name)?)) .collect::>()?; let objects = value diff --git a/object_store/src/azure/credential.rs b/object_store/src/azure/credential.rs index 721fcaea46f0..38e6e64f1e0f 100644 --- a/object_store/src/azure/credential.rs +++ b/object_store/src/azure/credential.rs @@ -153,7 +153,7 @@ fn generate_authorization( key: &str, ) -> String { let str_to_sign = string_to_sign(h, u, method, account); - let auth = hmac_sha256(base64::decode(key).unwrap(), &str_to_sign); + let auth = hmac_sha256(base64::decode(key).unwrap(), str_to_sign); format!("SharedKey {}:{}", account, base64::encode(auth)) } diff --git a/object_store/src/local.rs b/object_store/src/local.rs index f7b7ad7dd625..2ef87adbb093 100644 --- a/object_store/src/local.rs +++ b/object_store/src/local.rs @@ -396,7 +396,7 @@ impl ObjectStore for LocalFileSystem { None => self.config.root.to_file_path().unwrap(), }; - let walkdir = WalkDir::new(&root_path) + let walkdir = WalkDir::new(root_path) // Don't include the root directory itself .min_depth(1) .follow_links(true); @@ -748,7 +748,7 @@ impl AsyncWrite for LocalUpload { self.inner_state = LocalUploadState::Complete; file.sync_all()?; std::mem::drop(file); - std::fs::rename(&staging_path, &self.dest)?; + std::fs::rename(staging_path, &self.dest)?; Poll::Ready(Ok(())) } _ => {