fix: linting

This commit is contained in:
Michel de Graaf
2025-11-19 08:40:41 +01:00
parent bb86e50b4f
commit 9f174c4c5e
9 changed files with 93 additions and 57 deletions
+16 -23
View File
@@ -777,33 +777,26 @@ impl MainTui {
let sender = self.state.downloads_sender_channel.clone().unwrap();
thread::spawn(move || {
for (filename, username, size) in selected_files.into_iter() {
match client.download(
filename.clone(),
username.clone(),
size,
download_dir.clone(),
) {
Ok(rx) => {
if let Some(download) = client
.get_all_downloads()
.iter()
.find(|d| {
d.filename == filename && d.username == username
})
.cloned()
{
thread::spawn(move || {
for (filename, username, size) in selected_files.into_iter() {
match client.download(
filename.clone(),
username.clone(),
size,
download_dir.clone(),
) {
Ok((download, rx)) => {
let _ = sender.send((download, rx));
}
}
Err(e) => {
eprintln!(
"Failed to start download for {}: {}",
filename, e
);
Err(e) => {
eprintln!(
"Failed to start download for {}: {}",
filename, e
);
}
}
}
}
});
});
// Clear selection