mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-20 19:42:17 +00:00
fix:Apply suggestions from clippy 1.88
This commit is contained in:
@@ -147,8 +147,7 @@ async fn heal_fresh_disk(endpoint: &Endpoint) -> Result<()> {
|
||||
Some(disk) => disk,
|
||||
None => {
|
||||
return Err(Error::other(format!(
|
||||
"Unexpected error disk must be initialized by now after formatting: {}",
|
||||
endpoint
|
||||
"Unexpected error disk must be initialized by now after formatting: {endpoint}"
|
||||
)));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -487,7 +487,7 @@ impl CurrentScannerCycle {
|
||||
Deserialize::deserialize(&mut Deserializer::new(&buf[..])).expect("Deserialization failed");
|
||||
self.cycle_completed = u;
|
||||
}
|
||||
name => return Err(Error::other(format!("not support field name {}", name))),
|
||||
name => return Err(Error::other(format!("not support field name {name}"))),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -372,7 +372,7 @@ impl ScannerMetrics {
|
||||
|
||||
for (disk, tracker) in paths.iter() {
|
||||
let path = tracker.get_path().await;
|
||||
result.push(format!("{}/{}", disk, path));
|
||||
result.push(format!("{disk}/{path}"));
|
||||
}
|
||||
|
||||
result
|
||||
|
||||
@@ -318,7 +318,7 @@ impl HealSequence {
|
||||
self.count_scanned(heal_type.clone()).await;
|
||||
|
||||
if source.no_wait {
|
||||
let task_str = format!("{:?}", task);
|
||||
let task_str = format!("{task:?}");
|
||||
if GLOBAL_BackgroundHealRoutine.tasks_tx.try_send(task).is_ok() {
|
||||
info!("Task in the queue: {:?}", task_str);
|
||||
}
|
||||
@@ -328,7 +328,7 @@ impl HealSequence {
|
||||
let (resp_tx, mut resp_rx) = mpsc::channel(1);
|
||||
task.resp_tx = Some(resp_tx);
|
||||
|
||||
let task_str = format!("{:?}", task);
|
||||
let task_str = format!("{task:?}");
|
||||
if GLOBAL_BackgroundHealRoutine.tasks_tx.try_send(task).is_ok() {
|
||||
info!("Task in the queue: {:?}", task_str);
|
||||
} else {
|
||||
@@ -793,8 +793,7 @@ impl AllHealState {
|
||||
for (k, v) in self.heal_seq_map.read().await.iter() {
|
||||
if (has_prefix(k, path_s) || has_prefix(path_s, k)) && !v.has_ended().await {
|
||||
return Err(Error::other(format!(
|
||||
"The provided heal sequence path overlaps with an existing heal path: {}",
|
||||
k
|
||||
"The provided heal sequence path overlaps with an existing heal path: {k}"
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user