From 21a39b3cdac89099fa4c32b1411203f44e9b99a4 Mon Sep 17 00:00:00 2001 From: Maximiliano Sandoval Date: Wed, 14 Aug 2024 11:18:42 +0200 Subject: [PATCH] rest-server: remove use of once_cell Signed-off-by: Maximiliano Sandoval --- 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 = OnceCell::new(); +static WORKER_TASK_SETUP: OnceLock = OnceLock::new(); fn worker_task_setup() -> Result<&'static WorkerTaskSetup, Error> { WORKER_TASK_SETUP