chore: update to Rust 2024 edition

This commit is contained in:
mayor
2026-01-04 20:08:16 +01:00
committed by Michel de Graaf
parent f7ebcccdd3
commit 16c8a4bde9
9 changed files with 39 additions and 55 deletions
+4 -6
View File
@@ -81,8 +81,8 @@ impl MultiDownloadProgress {
// Poll all receivers for status updates
let mut need_start_next = false;
for download_entry in &mut self.downloads {
if let Some(receiver) = &download_entry.receiver {
if let Ok(status) = receiver.try_recv() {
if let Some(receiver) = &download_entry.receiver
&& let Ok(status) = receiver.try_recv() {
let was_active = !download_entry.download.is_finished();
download_entry.download.status = status;
let is_finished = download_entry.download.is_finished();
@@ -94,7 +94,6 @@ impl MultiDownloadProgress {
need_start_next = true;
}
}
}
}
// Start next batch after iteration completes
@@ -103,11 +102,10 @@ impl MultiDownloadProgress {
}
// Handle keyboard input
if poll(Duration::from_millis(100))? {
if let Event::Key(key) = event::read()? {
if poll(Duration::from_millis(100))?
&& let Event::Key(key) = event::read()? {
self.handle_key(key);
}
}
// Exit when user cancels or all downloads finished
if self.should_exit || self.all_finished() {