subscription: remove lazy_static dependency
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
This commit is contained in:
parent
6c0f6890e4
commit
692231d2a4
@ -6,6 +6,7 @@ edition.workspace = true
|
|||||||
license.workspace = true
|
license.workspace = true
|
||||||
repository.workspace = true
|
repository.workspace = true
|
||||||
description = "Proxmox subscription utilitites"
|
description = "Proxmox subscription utilitites"
|
||||||
|
rust-version.workspace = true
|
||||||
|
|
||||||
exclude.workspace = true
|
exclude.workspace = true
|
||||||
|
|
||||||
@ -13,7 +14,6 @@ exclude.workspace = true
|
|||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
base64.workspace = true
|
base64.workspace = true
|
||||||
hex.workspace = true
|
hex.workspace = true
|
||||||
lazy_static.workspace = true
|
|
||||||
openssl.workspace = true
|
openssl.workspace = true
|
||||||
regex.workspace = true
|
regex.workspace = true
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
use std::sync::LazyLock;
|
||||||
|
|
||||||
use anyhow::{bail, format_err, Error};
|
use anyhow::{bail, format_err, Error};
|
||||||
|
|
||||||
use lazy_static::lazy_static;
|
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
|
|
||||||
@ -11,9 +12,8 @@ use crate::{
|
|||||||
SubscriptionInfo, SubscriptionStatus,
|
SubscriptionInfo, SubscriptionStatus,
|
||||||
};
|
};
|
||||||
|
|
||||||
lazy_static! {
|
static ATTR_RE: LazyLock<Regex> =
|
||||||
static ref ATTR_RE: Regex = Regex::new(r"<([^>]+)>([^<]+)</[^>]+>").unwrap();
|
LazyLock::new(|| Regex::new(r"<([^>]+)>([^<]+)</[^>]+>").unwrap());
|
||||||
}
|
|
||||||
|
|
||||||
const SHOP_URI: &str = "https://shop.proxmox.com/modules/servers/licensing/verify.php";
|
const SHOP_URI: &str = "https://shop.proxmox.com/modules/servers/licensing/verify.php";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user