Ran cargo clippy and cargo fmt

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2024-11-04 17:48:44 +11:00
parent d887f73163
commit 201c8a4e7b
5 changed files with 29 additions and 19 deletions

View File

@ -110,11 +110,11 @@ pub async fn stop_specific_game_download(
#[tauri::command]
pub async fn get_game_download_progress(
state: tauri::State<'_, Mutex<AppState>>,
game_id: String
game_id: String,
) -> Result<f64, String> {
let lock = state.lock().unwrap();
let download_agent = lock.game_downloads.get(&game_id).unwrap();
let progress = download_agent.progress.get_progress_percentage();
info!("{}", progress);
return Ok(progress)
}
Ok(progress)
}