From 1fd614cdd4c5e22b5d2986f0b838e31daa81453d Mon Sep 17 00:00:00 2001 From: Swarnim Arun Date: Fri, 3 Nov 2023 01:19:56 +0530 Subject: [PATCH] fix: buggy state fetch (#471) --- src-tauri/src/download.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/download.rs b/src-tauri/src/download.rs index e59526a2..c42bfbd9 100644 --- a/src-tauri/src/download.rs +++ b/src-tauri/src/download.rs @@ -1,5 +1,6 @@ use crate::errors::{Context, Result}; use std::collections::HashMap; +use std::sync::Arc; use crate::{err, utils, SharedState}; use futures::StreamExt; @@ -144,7 +145,7 @@ impl Downloader { total_file_size: u64, size_on_disk: u64, ) -> Result<()> { - let state = self.window.state::(); + let state = self.window.state::>(); let mut downloading_files_guard = state.downloading_files.lock().await; if downloading_files_guard.contains(&output_path.as_ref().to_string()) { log::warn!("File already downloading: {}", output_path.as_ref());