From 91fc9fe6e86731da601bd3458a11179661352ee0 Mon Sep 17 00:00:00 2001 From: Bryan Lee <38807139+liby@users.noreply.github.com> Date: Wed, 26 Oct 2022 14:38:17 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E6=89=93=E5=8C=85?= =?UTF-8?q?=E5=90=8E=E6=97=A0=E6=B3=95=E8=AF=BB=E5=8F=96=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=AF=BC=E8=87=B4=E5=B4=A9=E6=BA=83=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= 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 8b2e2bb..55f0455 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -108,8 +108,8 @@ fn main() -> wry::Result<()> { } fn get_windows_config() -> WindowConfig { - let config_file = File::open("./tauri.conf.json").unwrap(); - let config: Config = serde_json::from_reader(config_file).unwrap(); + let config_file = include_str!("../tauri.conf.json"); + let config: Config = serde_json::from_str(config_file).expect("failed to parse windows config"); config.tauri.windows[0].clone() }