From f360f76510be9ec1b882c06d47a2d756d0295f4f Mon Sep 17 00:00:00 2001 From: Tw93 Date: Sat, 7 Jan 2023 22:11:48 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E6=AD=A3=E8=AF=AD=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index a9004d9..b626ec7 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -96,12 +96,12 @@ fn main() -> wry::Result<()> { #[cfg(target_os = "windows")] let window = { - let icon_path = format!("png/{}_32.ico", package_name); + let mut icon_path = format!("png/{}_32.ico", package_name); // 假如没有设置,就使用默认的即可 if !std::path::Path::new(&icon_path).exists() { icon_path = "png/icon_32.ico".to_string(); } - let icon = load_icon(std::path::Path::new(&icon_path)); + let icon = load_icon(std::path::Path::new(&mut icon_path)); common_window .with_decorations(true) .with_window_icon(Some(icon))