mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-31 17:28:12 +00:00
lint: clippy rules or_fun_call (#2561)
Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
@@ -351,7 +351,7 @@ impl RPCMetrics {
|
||||
s_by_de
|
||||
.entry(key.to_string())
|
||||
.and_modify(|v| v.merge(value))
|
||||
.or_insert(value.clone());
|
||||
.or_insert_with(|| value.clone());
|
||||
}
|
||||
}
|
||||
None => self.by_destination = Some(by_destination.clone()),
|
||||
@@ -365,7 +365,7 @@ impl RPCMetrics {
|
||||
s_by_caller
|
||||
.entry(key.to_string())
|
||||
.and_modify(|v| v.merge(value))
|
||||
.or_insert(value.clone());
|
||||
.or_insert_with(|| value.clone());
|
||||
}
|
||||
}
|
||||
None => self.by_caller = Some(by_caller.clone()),
|
||||
|
||||
Reference in New Issue
Block a user