codemods to remove lazy static 1/N

Summary:
first in a set of diffs with the intent of removing `lazy_static!` from fbcode.

this diff changes `std::sync::Mutex` and `parking_lot::Mutex` to plain `static` initializations where possible.

Reviewed By: zertosh

Differential Revision: D46335784

fbshipit-source-id: 105848f38dcb8083be77a4ad4db267058081fe53
This commit is contained in:
Shayne Fletcher 2023-06-05 17:01:50 -07:00 committed by Facebook GitHub Bot
parent 41880aaa0e
commit 09a86f99f9

View file

@ -603,11 +603,11 @@ mod tests {
use super::*;
lazy_static! {
/// Each of these unit tests is mutating the global slotmap, so they
/// can't interfere with each other
static ref UNIT_TEST_LOCK: Mutex<()> = Mutex::new(());
/// Each of these unit tests is mutating the global slotmap, so they
/// can't interfere with each other
static UNIT_TEST_LOCK: Mutex<()> = Mutex::new(());
lazy_static! {
/// Keep track of the process and thread ids raised in start and exit
/// events
static ref THREADS_STARTED: Mutex<HashSet<PidTid>> = Mutex::new(HashSet::default());