mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-07-22 23:18:30 +00:00
datastore: remove lazy_static dependency
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
This commit is contained in:
parent
7549722640
commit
a637e7f490
@ -4,6 +4,7 @@ version = "0.1.0"
|
|||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
description = "low level pbs data storage access"
|
description = "low level pbs data storage access"
|
||||||
|
rust-version.workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
@ -12,7 +13,6 @@ crc32fast.workspace = true
|
|||||||
endian_trait.workspace = true
|
endian_trait.workspace = true
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
hex = { workspace = true, features = [ "serde" ] }
|
hex = { workspace = true, features = [ "serde" ] }
|
||||||
lazy_static.workspace = true
|
|
||||||
libc.workspace = true
|
libc.workspace = true
|
||||||
log.workspace = true
|
log.workspace = true
|
||||||
nix.workspace = true
|
nix.workspace = true
|
||||||
|
@ -2,10 +2,9 @@ use std::collections::{HashMap, HashSet};
|
|||||||
use std::io::{self, Write};
|
use std::io::{self, Write};
|
||||||
use std::os::unix::io::AsRawFd;
|
use std::os::unix::io::AsRawFd;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, LazyLock, Mutex};
|
||||||
|
|
||||||
use anyhow::{bail, format_err, Error};
|
use anyhow::{bail, format_err, Error};
|
||||||
use lazy_static::lazy_static;
|
|
||||||
use nix::unistd::{unlinkat, UnlinkatFlags};
|
use nix::unistd::{unlinkat, UnlinkatFlags};
|
||||||
use tracing::{info, warn};
|
use tracing::{info, warn};
|
||||||
|
|
||||||
@ -33,10 +32,8 @@ use crate::manifest::ArchiveType;
|
|||||||
use crate::task_tracking::{self, update_active_operations};
|
use crate::task_tracking::{self, update_active_operations};
|
||||||
use crate::DataBlob;
|
use crate::DataBlob;
|
||||||
|
|
||||||
lazy_static! {
|
static DATASTORE_MAP: LazyLock<Mutex<HashMap<String, Arc<DataStoreImpl>>>> =
|
||||||
static ref DATASTORE_MAP: Mutex<HashMap<String, Arc<DataStoreImpl>>> =
|
LazyLock::new(|| Mutex::new(HashMap::new()));
|
||||||
Mutex::new(HashMap::new());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// checks if auth_id is owner, or, if owner is a token, if
|
/// checks if auth_id is owner, or, if owner is a token, if
|
||||||
/// auth_id is the user of the token
|
/// auth_id is the user of the token
|
||||||
|
Loading…
Reference in New Issue
Block a user