chore(lint): clippy rules redundant_clone (#2554)

This commit is contained in:
Tunglies
2026-04-15 06:54:07 -07:00
committed by GitHub
parent 73e6542eea
commit 49366ee200
57 changed files with 100 additions and 119 deletions
@@ -593,7 +593,7 @@ impl BucketTargetSys {
};
if let Some(cli) = cli {
return Some(cli.clone());
return Some(cli);
}
// TODO: spawn a task to reload the target
@@ -821,7 +821,7 @@ pub async fn abort_incomplete_multipart_upload_due(
.as_ref()?
.days_after_initiation
.filter(|days| *days > 0)?;
Some((expected_expiry_time(initiated, days), rule.id.clone().unwrap_or_default()))
Some((expected_expiry_time(initiated, days), rule.id.unwrap_or_default()))
})
.min_by_key(|(due, _)| due.unix_timestamp_nanos())
}
@@ -83,7 +83,7 @@ impl LastDayTierStats {
#[allow(dead_code)]
fn merge(&self, m: LastDayTierStats) -> LastDayTierStats {
let mut cl = self.clone();
let mut cm = m.clone();
let mut cm = m;
let mut merged = LastDayTierStats::default();
if cl.updated_at.unix_timestamp() > cm.updated_at.unix_timestamp() {
+1 -1
View File
@@ -678,7 +678,7 @@ impl BucketMetadata {
// let x = data.clone();
// let str = std::str::from_utf8(&x).expect("Invalid UTF-8");
// println!("update config:{}", str);
self.bucket_targets_config_json = data.clone();
self.bucket_targets_config_json = data;
self.bucket_targets_config_updated_at = updated;
}
BUCKET_CORS_CONFIG => {
@@ -754,7 +754,7 @@ impl<S: StorageAPI> ReplicationPool<S> {
buckets: Vec<String>,
) -> Result<(), EcstoreError> {
// Load bucket metadata system in background
let pool_clone = self.clone();
let pool_clone = self;
tokio::spawn(async move {
pool_clone.start_resync_routine(buckets, cancellation_token).await;