[pbs-devel] [PATCH proxmox 15/15] rest-server: remove use of once_cell
Maximiliano Sandoval
m.sandoval at proxmox.com
Wed Aug 14 11:18:42 CEST 2024
Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
Cargo.toml | 1 -
proxmox-rest-server/Cargo.toml | 1 -
proxmox-rest-server/src/worker_task.rs | 3 +--
3 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index 6360db1f..2b012974 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -90,7 +90,6 @@ log = "0.4.17"
mail-parser = "0.8.2"
native-tls = "0.2"
nix = "0.26.1"
-once_cell = "1.3.1"
openssl = "0.10"
pam-sys = "0.5"
percent-encoding = "2.1"
diff --git a/proxmox-rest-server/Cargo.toml b/proxmox-rest-server/Cargo.toml
index 280e035a..45751d7e 100644
--- a/proxmox-rest-server/Cargo.toml
+++ b/proxmox-rest-server/Cargo.toml
@@ -23,7 +23,6 @@ hyper = { workspace = true, features = [ "full" ] }
libc.workspace = true
log.workspace = true
nix.workspace = true
-once_cell.workspace = true
openssl.workspace = true
percent-encoding.workspace = true
regex.workspace = true
diff --git a/proxmox-rest-server/src/worker_task.rs b/proxmox-rest-server/src/worker_task.rs
index 228abb7f..6e76c2ca 100644
--- a/proxmox-rest-server/src/worker_task.rs
+++ b/proxmox-rest-server/src/worker_task.rs
@@ -10,7 +10,6 @@ use std::time::{Duration, SystemTime};
use anyhow::{bail, format_err, Error};
use futures::*;
use nix::fcntl::OFlag;
-use once_cell::sync::OnceCell;
use serde::{Deserialize, Serialize};
use serde_json::{json, Value};
use tokio::signal::unix::SignalKind;
@@ -99,7 +98,7 @@ struct WorkerTaskSetup {
task_archive_fn: PathBuf,
}
-static WORKER_TASK_SETUP: OnceCell<WorkerTaskSetup> = OnceCell::new();
+static WORKER_TASK_SETUP: OnceLock<WorkerTaskSetup> = OnceLock::new();
fn worker_task_setup() -> Result<&'static WorkerTaskSetup, Error> {
WORKER_TASK_SETUP
--
2.39.2
More information about the pbs-devel
mailing list