fix: app version to string

This commit is contained in:
GyDi 2022-10-16 14:38:57 +08:00
parent 515af472ce
commit 35d0438261
No known key found for this signature in database
GPG Key ID: 58B15242BA8277A6

View File

@ -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));
}