From 35d0438261027b86ab79db01b402f6b673ffa115 Mon Sep 17 00:00:00 2001
From: GyDi <segydi@foxmail.com>
Date: Sun, 16 Oct 2022 14:38:57 +0800
Subject: [PATCH] fix: app version to string

---
 src-tauri/src/utils/dirs.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src-tauri/src/utils/dirs.rs b/src-tauri/src/utils/dirs.rs
index 2bc3cfd..b0cdca1 100644
--- a/src-tauri/src/utils/dirs.rs
+++ b/src-tauri/src/utils/dirs.rs
@@ -69,8 +69,8 @@ pub fn app_resources_dir(package_info: &PackageInfo) -> PathBuf {
   unsafe {
     RESOURCE_DIR = Some(res_dir.clone());
 
-    let ver = &package_info.version;
-    let ver_str = format!("v{}.{}.{}", ver.major, ver.minor, ver.patch);
+    let ver = package_info.version.to_string();
+    let ver_str = format!("v{ver}");
     APP_VERSION = Box::leak(Box::new(ver_str));
   }
 
-- 
GitLab