tree wide: clippy lint fixes

most (not all) where done automatically

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-06-02 15:59:53 +02:00
parent 4faf81dc69
commit 917f5f73af

View File

@ -262,10 +262,8 @@ pub fn rotate_task_log_archive(
} }
} }
} }
} else { } else if let Err(err) = std::fs::remove_file(&file_name) {
if let Err(err) = std::fs::remove_file(&file_name) { log::error!("could not remove {:?}: {}", file_name, err);
log::error!("could not remove {:?}: {}", file_name, err);
}
} }
} }
} }
@ -966,7 +964,7 @@ impl WorkerTask {
/// Set progress indicator /// Set progress indicator
pub fn progress(&self, progress: f64) { pub fn progress(&self, progress: f64) {
if progress >= 0.0 && progress <= 1.0 { if (0.0..=1.0).contains(&progress) {
let mut data = self.data.lock().unwrap(); let mut data = self.data.lock().unwrap();
data.progress = progress; data.progress = progress;
} else { } else {