Skip to content

Commit

Permalink
use normal const
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed Sep 20, 2024
1 parent deff160 commit bb0a390
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/tauri/src/updater/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use http::{
HeaderMap, StatusCode,
};
use minisign_verify::{PublicKey, Signature};
use percent_encoding::CONTROLS;
use percent_encoding::{AsciiSet, CONTROLS};
use semver::Version;
use serde::{de::Error as DeError, Deserialize, Deserializer, Serialize};
use tauri_utils::{platform::current_exe, Env};
Expand Down Expand Up @@ -376,8 +376,8 @@ impl<R: Runtime> UpdateBuilder<R> {
// The main objective is if the update URL is defined via the Cargo.toml
// the URL will be generated dynamically
let version = self.current_version.to_string();
let ascii_set = const { &CONTROLS.add(b'+') };
let encoded_version = percent_encoding::percent_encode(version.as_bytes(), ascii_set);
const CONTROLS_ADD: &AsciiSet = &CONTROLS.add(b'+');
let encoded_version = percent_encoding::percent_encode(version.as_bytes(), CONTROLS_ADD);

let fixed_link = url
.replace("{{current_version}}", &encoded_version.to_string())
Expand Down

0 comments on commit bb0a390

Please sign in to comment.