From 3293edc503815260c74104a767791a2c2115b78d Mon Sep 17 00:00:00 2001 From: Shayne Fletcher Date: Sat, 30 Sep 2023 08:55:43 -0700 Subject: [PATCH] once_cell::{unsync|sync}::OnceCell -> std::{cell|sync}::{OnceCell|OnceLock} Summary: codemod: replace `once_cell` with `std` Reviewed By: lnyng, JakobDegen Differential Revision: D49776342 fbshipit-source-id: 3f6ca2c1edab61f61b748c1a1c3ffbee872fbf93 --- below/config/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/below/config/src/lib.rs b/below/config/src/lib.rs index 8f58f2fd..11cde69e 100644 --- a/below/config/src/lib.rs +++ b/below/config/src/lib.rs @@ -15,10 +15,10 @@ use std::fs; use std::path::Path; use std::path::PathBuf; +use std::sync::OnceLock; use anyhow::bail; use anyhow::Result; -use once_cell::sync::OnceCell; use serde::Deserialize; use serde::Serialize; @@ -30,7 +30,7 @@ const BELOW_DEFAULT_LOG: &str = "/var/log/below"; const BELOW_DEFAULT_STORE: &str = "/var/log/below/store"; /// Global below config -pub static BELOW_CONFIG: OnceCell = OnceCell::new(); +pub static BELOW_CONFIG: OnceLock = OnceLock::new(); #[derive(Serialize, Deserialize, Debug)] // If value is missing during deserialization, use the Default::default()