mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-11 07:36:53 +00:00
chore(lint): clippy rules redundant_clone (#2554)
This commit is contained in:
@@ -357,7 +357,7 @@ impl S3PeerSys {
|
||||
|
||||
ress.into_iter()
|
||||
.filter(|op| op.is_some())
|
||||
.find_map(|op| op.clone())
|
||||
.find_map(|op| op)
|
||||
.ok_or(Error::VolumeNotFound)
|
||||
}
|
||||
|
||||
@@ -575,7 +575,7 @@ pub struct RemotePeerS3Client {
|
||||
|
||||
impl RemotePeerS3Client {
|
||||
pub fn new(node: Option<Node>, pools: Option<Vec<usize>>) -> Self {
|
||||
let addr = node.as_ref().map(|v| v.url.to_string()).unwrap_or_default().to_string();
|
||||
let addr = node.as_ref().map(|v| v.url.to_string()).unwrap_or_default();
|
||||
let client = Self {
|
||||
node,
|
||||
pools,
|
||||
|
||||
@@ -109,7 +109,7 @@ impl RemoteDisk {
|
||||
|
||||
let disk = Self {
|
||||
id: Mutex::new(None),
|
||||
addr: addr.clone(),
|
||||
addr,
|
||||
endpoint: ep.clone(),
|
||||
scanning: Arc::new(AtomicU32::new(0)),
|
||||
health_check: opt.health_check && env_health_check,
|
||||
|
||||
Reference in New Issue
Block a user