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
+10 -3
View File
@@ -242,7 +242,8 @@ impl DownloadPeer {
let client_guard = client_context
.read()
.map_err(|_| DownloadError::LockPoisoned)?;
let download_info = client_guard.get_download_by_token(token_u32).cloned();
let download_info =
client_guard.get_download_by_token(token_u32).cloned();
drop(client_guard);
download_info.ok_or(DownloadError::TokenNotFound(token_u32))
@@ -323,7 +324,10 @@ impl DownloadPeer {
speed_bytes_per_sec: speed,
};
let _ = dl.sender.send(status.clone());
client_context.write().unwrap().update_download_with_status(dl.token, status);
client_context
.write()
.unwrap()
.update_download_with_status(dl.token, status);
last_update_time = Instant::now();
}
@@ -421,7 +425,10 @@ impl DownloadPeer {
if let Some(ref dl) = download {
let _ = dl.sender.send(DownloadStatus::Queued);
client_context.write().unwrap().update_download_with_status(dl.token, DownloadStatus::Queued);
client_context
.write()
.unwrap()
.update_download_with_status(dl.token, DownloadStatus::Queued);
}
let mut stream = match stream {