refactor(downloads): Ran cargo clippy & moved DownloadManagerInterface

Created file "download_manager_interface.rs" to contain the DownloadManagerInterface

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2024-11-13 21:05:25 +11:00
parent a1ada07690
commit 075d6ecf3c
7 changed files with 151 additions and 127 deletions

View File

@ -26,7 +26,7 @@ impl ProgressObject {
.sum()
}
pub fn get_max(&self) -> usize {
self.max.lock().unwrap().clone()
*self.max.lock().unwrap()
}
pub fn set_max(&self, new_max: usize) {
*self.max.lock().unwrap() = new_max