Skip to content

Commit

Permalink
More clippy lint fixes (#3355)
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold authored Dec 16, 2022
1 parent 3039633 commit 89354ca
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion object_store/src/aws/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl TryFrom<ListResponse> 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::<Result<_>>()?;

let objects = value
Expand Down
2 changes: 1 addition & 1 deletion object_store/src/azure/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ impl TryFrom<ListResultInternal> for ListResult {
.blob_prefix
.unwrap_or_default()
.into_iter()
.map(|x| Ok(Path::parse(&x.name)?))
.map(|x| Ok(Path::parse(x.name)?))
.collect::<Result<_>>()?;

let objects = value
Expand Down
2 changes: 1 addition & 1 deletion object_store/src/azure/credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

Expand Down
4 changes: 2 additions & 2 deletions object_store/src/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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(()))
}
_ => {
Expand Down

0 comments on commit 89354ca

Please sign in to comment.