mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-12 23:36:52 +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:
@@ -429,11 +429,11 @@ async fn handle_inner(
|
||||
// - Caching directives such as If-None-Match, etc, which are not relevant
|
||||
let cleaned_req = Request::builder().uri(req.uri()).body(()).unwrap();
|
||||
|
||||
let mut ret = match req.method() {
|
||||
&Method::HEAD => {
|
||||
let mut ret = match *req.method() {
|
||||
Method::HEAD => {
|
||||
handle_head_without_ctx(garage, &cleaned_req, bucket_id, key, None).await?
|
||||
}
|
||||
&Method::GET => {
|
||||
Method::GET => {
|
||||
handle_get_without_ctx(
|
||||
garage,
|
||||
&cleaned_req,
|
||||
@@ -451,9 +451,9 @@ async fn handle_inner(
|
||||
|
||||
Ok(ret)
|
||||
} else {
|
||||
match req.method() {
|
||||
&Method::HEAD => handle_head_without_ctx(garage, req, bucket_id, key, None).await,
|
||||
&Method::GET => {
|
||||
match *req.method() {
|
||||
Method::HEAD => handle_head_without_ctx(garage, req, bucket_id, key, None).await,
|
||||
Method::GET => {
|
||||
handle_get_without_ctx(garage, req, bucket_id, key, None, Default::default()).await
|
||||
}
|
||||
_ => Err(ApiError::bad_request("HTTP method not supported")),
|
||||
|
||||
Reference in New Issue
Block a user