refactor(downloads): Ran cargo fmt

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2024-11-13 21:28:24 +11:00
parent 075d6ecf3c
commit b8cf44c0b2
7 changed files with 119 additions and 62 deletions

View File

@ -1,7 +1,6 @@
use std::sync::Mutex;
use crate::{AppState};
use crate::AppState;
#[tauri::command]
pub fn download_game(
@ -27,7 +26,12 @@ pub fn download_game(
download_agent_ref.clone().run();
});
*/
state.lock().unwrap().download_manager.queue_game(game_id, game_version, 0).unwrap();
state
.lock()
.unwrap()
.download_manager
.queue_game(game_id, game_version, 0)
.unwrap();
Ok(())
}
@ -43,7 +47,12 @@ pub fn get_game_download_progress(
Ok(progress.get_progress())
*/
let progress = state.lock().unwrap().download_manager.get_current_game_download_progress().unwrap_or(0.0);
let progress = state
.lock()
.unwrap()
.download_manager
.get_current_game_download_progress()
.unwrap_or(0.0);
Ok(progress)
}
@ -56,4 +65,4 @@ fn use_download_agent(
let download_agent = lock.download_manager.get(&game_id).ok_or("Invalid game ID")?;
Ok(download_agent.clone()) // Clones the Arc, not the underlying data structure
}
*/
*/