Skip to content

Commit

Permalink
VTX-3411: address clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
fsdvh committed Dec 8, 2023
1 parent 312ca66 commit 0c6c268
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion object_store/src/azure/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ struct ListResultInternal {
}

fn to_list_result(value: ListResultInternal, prefix: Option<&str>) -> Result<ListResult> {
let prefix = prefix.map(Path::from).unwrap_or_else(Path::default);
let prefix = prefix.map(Path::from).unwrap_or_default();
let common_prefixes = value
.blobs
.blob_prefix
Expand Down
7 changes: 2 additions & 5 deletions object_store/src/azure/credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,8 @@ fn string_to_sign(h: &HeaderMap, u: &Url, method: &Method, account: &str) -> Str
fn canonicalize_header(headers: &HeaderMap) -> String {
let mut names = headers
.iter()
.filter_map(|(k, _)| {
(k.as_str().starts_with("x-ms"))
// TODO remove unwraps
.then(|| (k.as_str(), headers.get(k).unwrap().to_str().unwrap()))
})
.filter(|(k, _)| (k.as_str().starts_with("x-ms")))
.map(|(k, _)| (k.as_str(), headers.get(k).unwrap().to_str().unwrap()))
.collect::<Vec<_>>();
names.sort_unstable();

Expand Down

0 comments on commit 0c6c268

Please sign in to comment.