From 3fd70de4a640e09bcce129bbc7cbb5582936a925 Mon Sep 17 00:00:00 2001 From: weisd Date: Tue, 1 Jul 2025 09:41:55 +0800 Subject: [PATCH] fix: clippy --- crates/signer/src/request_signature_v2.rs | 4 ++-- crates/utils/src/net.rs | 4 +--- ecstore/src/client/utils.rs | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/crates/signer/src/request_signature_v2.rs b/crates/signer/src/request_signature_v2.rs index bed6bb220..58569763b 100644 --- a/crates/signer/src/request_signature_v2.rs +++ b/crates/signer/src/request_signature_v2.rs @@ -13,8 +13,8 @@ const SIGN_V2_ALGORITHM: &str = "AWS"; fn encode_url2path(req: &request::Builder, _virtual_host: bool) -> String { //path = serde_urlencoded::to_string(req.uri_ref().unwrap().path().unwrap()).unwrap(); - let path = req.uri_ref().unwrap().path().to_string(); - path + + req.uri_ref().unwrap().path().to_string() } pub fn pre_sign_v2( diff --git a/crates/utils/src/net.rs b/crates/utils/src/net.rs index 64c49d137..2882f9cae 100644 --- a/crates/utils/src/net.rs +++ b/crates/utils/src/net.rs @@ -5,7 +5,7 @@ use hyper::client::conn::http2::Builder; use hyper_util::rt::TokioExecutor; use lazy_static::lazy_static; use std::{ - collections::{HashMap, HashSet}, + collections::HashSet, fmt::Display, net::{IpAddr, Ipv6Addr, SocketAddr, TcpListener, ToSocketAddrs}, }; @@ -135,8 +135,6 @@ pub fn new_remotetarget_http_transport(_insecure: bool) -> Builder bool { diff --git a/ecstore/src/client/utils.rs b/ecstore/src/client/utils.rs index 170e835ea..964f4a8d9 100644 --- a/ecstore/src/client/utils.rs +++ b/ecstore/src/client/utils.rs @@ -1,5 +1,5 @@ use lazy_static::lazy_static; -use std::collections::{HashMap, HashSet}; +use std::collections::HashMap; use s3s::header::X_AMZ_STORAGE_CLASS; @@ -75,4 +75,4 @@ pub fn is_rustfs_header(header_key: &str) -> bool { pub fn is_minio_header(header_key: &str) -> bool { header_key.to_lowercase().starts_with("x-minio-") -} \ No newline at end of file +}