mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-31 17:28:13 +00:00
chore: clean relative to references and borrows
- lint message: the borrowed expression implements the required traits help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrows_for_generic_args - lint message: this expression creates a reference which is immediately dereferenced by the compiler help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow - lint message: you don't need to add `&` to all patterns help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#match_ref_pat - remove useless taken reference lint message: needlessly taken reference of left operand help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#op_ref - use &Path instead of &PathBuf as fn parameters lint message: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#ptr_arg
This commit is contained in:
@@ -187,7 +187,7 @@ fn check_presigned_signature(
|
||||
let headers_mut = request.headers_mut();
|
||||
for (name, value) in query.iter() {
|
||||
if let Some(existing) = headers_mut.get(name) {
|
||||
if signed_headers.contains(&name) && existing.as_bytes() != value.value.as_bytes() {
|
||||
if signed_headers.contains(name) && existing.as_bytes() != value.value.as_bytes() {
|
||||
return Err(Error::bad_request(format!(
|
||||
"Conflicting values for `{}` in query parameters and request headers",
|
||||
name
|
||||
@@ -343,7 +343,7 @@ pub fn canonical_request(
|
||||
let canonical_query_string = {
|
||||
let mut items = Vec::with_capacity(query.len());
|
||||
for (_, QueryValue { key, value }) in query.iter() {
|
||||
items.push(uri_encode(&key, true) + "=" + &uri_encode(&value, true));
|
||||
items.push(uri_encode(key, true) + "=" + &uri_encode(value, true));
|
||||
}
|
||||
items.sort();
|
||||
items.join("&")
|
||||
|
||||
Reference in New Issue
Block a user