From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id BE7131FF167 for ; Wed, 14 Aug 2024 09:23:35 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0E5FF18013; Wed, 14 Aug 2024 09:23:51 +0200 (CEST) From: Maximiliano Sandoval To: pbs-devel@lists.proxmox.com Date: Wed, 14 Aug 2024 09:23:47 +0200 Message-Id: <20240814072347.57909-1-m.sandoval@proxmox.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.111 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pbs-devel] [PATCH offline-mirror v2] remove lazy_static dependency X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" Signed-off-by: Maximiliano Sandoval --- Differences from v1: - Remove changes to d/control Cargo.toml | 3 +-- src/config.rs | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 781121f..21e9487 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Proxmox Support Team "] edition = "2021" license = "AGPL-3" description = "Proxmox offline repository mirror and subscription key manager" -rust-version = "1.70" +rust-version = "1.80" exclude = ["debian"] @@ -16,7 +16,6 @@ bzip2 = "0.4" flate2 = "1.0.22" globset = "0.4.8" hex = "0.4.3" -lazy_static = "1.4" nix = "0.26.1" openssl = "0.10" regex = "1.5.5" diff --git a/src/config.rs b/src/config.rs index 9c75717..eb69a6b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,7 +1,7 @@ use std::path::Path; +use std::sync::LazyLock; use anyhow::{bail, Error}; -use lazy_static::lazy_static; use proxmox_subscription::{sign::ServerBlob, SubscriptionInfo}; use serde::{Deserialize, Serialize}; @@ -261,9 +261,7 @@ impl SubscriptionKey { } } -lazy_static! { - pub static ref CONFIG: SectionConfig = init(); -} +pub static CONFIG: LazyLock = LazyLock::new(init); fn init() -> SectionConfig { let mut config = SectionConfig::new(&MIRROR_ID_SCHEMA); -- 2.39.2 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel