mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-14 16:51:18 +10:00
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:
@ -1,7 +1,5 @@
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::sync::Mutex;
|
||||
|
||||
use log::info;
|
||||
use rayon::spawn;
|
||||
|
||||
use crate::{AppState};
|
||||
|
||||
@ -45,10 +43,7 @@ pub fn get_game_download_progress(
|
||||
|
||||
Ok(progress.get_progress())
|
||||
*/
|
||||
let progress = match state.lock().unwrap().download_manager.get_current_game_download_progress() {
|
||||
Some(progress) => progress,
|
||||
None => 0.0
|
||||
};
|
||||
let progress = state.lock().unwrap().download_manager.get_current_game_download_progress().unwrap_or(0.0);
|
||||
|
||||
Ok(progress)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user