public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH offline-mirror v2] remove lazy_static dependency
@ 2024-08-14  7:23 Maximiliano Sandoval
  2024-08-28 13:03 ` [pbs-devel] applied: " Wolfgang Bumiller
  0 siblings, 1 reply; 2+ messages in thread
From: Maximiliano Sandoval @ 2024-08-14  7:23 UTC (permalink / raw)
  To: pbs-devel

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
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 <support@proxmox.com>"]
 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<SectionConfig> = 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-28 13:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-14  7:23 [pbs-devel] [PATCH offline-mirror v2] remove lazy_static dependency Maximiliano Sandoval
2024-08-28 13:03 ` [pbs-devel] applied: " Wolfgang Bumiller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal