Skip to content

Commit d4c102c

Browse files
committed
once_cell, not lazy_static
1 parent d9f9953 commit d4c102c

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ indicatif = "=0.17.3"
6060
ipnetwork = "=0.20.0"
6161
tikv-jemallocator = { version = "=0.5.0", features = ['unprefixed_malloc_on_supported_platforms', 'profiling'] }
6262
lettre = { version = "=0.10.4", default-features = false, features = ["file-transport", "smtp-transport", "native-tls", "hostname", "builder"] }
63-
lazy_static = "=1.4.0"
6463
minijinja = "=0.32.1"
6564
moka = { version = "=0.11.0", features = ["future"] }
6665
oauth2 = { version = "=4.3.0", default-features = false, features = ["reqwest"] }

src/models/helpers/admin.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
use std::{collections::HashSet, num::ParseIntError, str::FromStr};
22

3-
use lazy_static::lazy_static;
3+
use once_cell::sync::Lazy;
44

55
use crate::util::errors::{forbidden, AppResult};
66

7-
lazy_static! {
8-
static ref AUTHORIZED_ADMIN_USER_IDS: HashSet<i32> =
9-
parse_authorized_admin_users(dotenv::var("GH_ADMIN_USER_IDS"));
10-
}
7+
static AUTHORIZED_ADMIN_USER_IDS: Lazy<HashSet<i32>> =
8+
Lazy::new(|| parse_authorized_admin_users(dotenv::var("GH_ADMIN_USER_IDS")));
119

1210
// The defaults correspond to the current crates.io team.
1311
//

0 commit comments

Comments
 (0)