We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 940d249 commit 9b0806aCopy full SHA for 9b0806a
stylo_config/Cargo.toml
@@ -12,6 +12,3 @@ edition = "2021"
12
[lib]
13
name = "stylo_config"
14
path = "lib.rs"
15
-
16
-[dependencies]
17
-lazy_static = "1.4"
stylo_config/lib.rs
@@ -3,13 +3,9 @@
3
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
5
use std::collections::HashMap;
6
-use std::sync::RwLock;
+use std::sync::{LazyLock, RwLock};
7
8
-use lazy_static::lazy_static;
9
10
-lazy_static! {
11
- static ref PREFS: Preferences = Preferences::default();
-}
+static PREFS: LazyLock<Preferences> = LazyLock::new(Preferences::default);
#[derive(Debug, Default)]
pub struct Preferences {
0 commit comments