mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-14 08:41:21 +10:00
refactor(downloads): Ran cargo fmt
Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
@ -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
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user