Skip to content

Commit

Permalink
refactor: partially revert #23
Browse files Browse the repository at this point in the history
  • Loading branch information
Integral-Tech authored and xz-dev committed Dec 8, 2024
1 parent a86ac0f commit a4cbb64
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/core/config/world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::{error::Result, utils::instance::InstanceContainer};

use self::world_list::WorldList;

const INSTANCE_CONTAINER: Lazy<InstanceContainer<WorldList>> =
static INSTANCE_CONTAINER: Lazy<InstanceContainer<WorldList>> =
Lazy::new(|| InstanceContainer::new(WorldList::new()));

pub async fn init_world_list(world_list_path: &Path) -> Result<()> {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ pub async fn https_head(
}

// Global https provider with lazy initialization
const PROVIDER: Lazy<std::sync::Arc<rustls::crypto::CryptoProvider>> =
static PROVIDER: Lazy<std::sync::Arc<rustls::crypto::CryptoProvider>> =
Lazy::new(|| std::sync::Arc::new(rustls::crypto::ring::default_provider()));

// Https config error wrapper error
Expand Down
4 changes: 2 additions & 2 deletions src/utils/versioning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ use version_compare;
use once_cell::sync::Lazy;
use regex::Regex;

const VERSION_NUMBER_STRICT_MATCH_REGEX: Lazy<Regex> =
static VERSION_NUMBER_STRICT_MATCH_REGEX: Lazy<Regex> =
Lazy::new(|| Regex::new(r"\d+(\.\d+)+([.|\-|+|_| ]*[A-Za-z0-9]+)*").unwrap());

const VERSION_NUMBER_MATCH_REGEX: Lazy<Regex> =
static VERSION_NUMBER_MATCH_REGEX: Lazy<Regex> =
Lazy::new(|| Regex::new(r"\d+(\.\d+)*([.|\-|+|_| ]*[A-Za-z0-9]+)*").unwrap());

#[derive(Debug, Clone)]
Expand Down

0 comments on commit a4cbb64

Please sign in to comment.