From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 09C8F1FF167 for ; Wed, 14 Aug 2024 09:19:56 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B803AFC04; Wed, 14 Aug 2024 09:20:07 +0200 (CEST) From: Maximiliano Sandoval To: pbs-devel@lists.proxmox.com Date: Wed, 14 Aug 2024 09:19:53 +0200 Message-Id: <20240814072001.53422-4-m.sandoval@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240814072001.53422-1-m.sandoval@proxmox.com> References: <20240814072001.53422-1-m.sandoval@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.113 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 proxmox v2 04/12] subscription: 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 --- proxmox-subscription/Cargo.toml | 2 +- proxmox-subscription/src/check.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/proxmox-subscription/Cargo.toml b/proxmox-subscription/Cargo.toml index 4ec37d4c..38fc8e22 100644 --- a/proxmox-subscription/Cargo.toml +++ b/proxmox-subscription/Cargo.toml @@ -6,6 +6,7 @@ edition.workspace = true license.workspace = true repository.workspace = true description = "Proxmox subscription utilitites" +rust-version.workspace = true exclude.workspace = true @@ -13,7 +14,6 @@ exclude.workspace = true anyhow.workspace = true base64.workspace = true hex.workspace = true -lazy_static.workspace = true openssl.workspace = true regex.workspace = true serde.workspace = true diff --git a/proxmox-subscription/src/check.rs b/proxmox-subscription/src/check.rs index 0ef6f046..8522bcd3 100644 --- a/proxmox-subscription/src/check.rs +++ b/proxmox-subscription/src/check.rs @@ -1,6 +1,7 @@ +use std::sync::LazyLock; + use anyhow::{bail, format_err, Error}; -use lazy_static::lazy_static; use regex::Regex; use serde_json::json; @@ -11,9 +12,8 @@ use crate::{ SubscriptionInfo, SubscriptionStatus, }; -lazy_static! { - static ref ATTR_RE: Regex = Regex::new(r"<([^>]+)>([^<]+)]+>").unwrap(); -} +static ATTR_RE: LazyLock = + LazyLock::new(|| Regex::new(r"<([^>]+)>([^<]+)]+>").unwrap()); const SHOP_URI: &str = "https://shop.proxmox.com/modules/servers/licensing/verify.php"; -- 2.39.2 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel