refactor(download manager): Removed Arc requirement for DownloadableMetadata

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2025-01-02 12:24:22 +11:00
parent cac612b176
commit 8be1dd435c
9 changed files with 40 additions and 40 deletions

View File

@ -220,9 +220,9 @@ pub fn fetch_download_dir_stats() -> Result<Vec<String>, String> {
Ok(directories)
}
pub fn set_game_status<F: FnOnce(&mut RwLockWriteGuard<'_, Database>, &Arc<DownloadableMetadata>)>(
pub fn set_game_status<F: FnOnce(&mut RwLockWriteGuard<'_, Database>, &DownloadableMetadata)>(
app_handle: &AppHandle,
id: Arc<DownloadableMetadata>,
id: DownloadableMetadata,
setter: F,
) {
let mut db_handle = DB.borrow_data_mut().unwrap();