chore: Replace lazy_static Mutex with const. (#2693)
Mutex::new() is const-stable as of Rust 1.63. Release Notes: - N/A
This commit is contained in:
parent
79ece8a86e
commit
abf3b4a54e
9 changed files with 8 additions and 27 deletions
|
@ -3517,7 +3517,6 @@ pub use test::*;
|
|||
mod test {
|
||||
use super::*;
|
||||
use gpui::executor::Background;
|
||||
use lazy_static::lazy_static;
|
||||
use parking_lot::Mutex;
|
||||
use sea_orm::ConnectionTrait;
|
||||
use sqlx::migrate::MigrateDatabase;
|
||||
|
@ -3566,9 +3565,7 @@ mod test {
|
|||
}
|
||||
|
||||
pub fn postgres(background: Arc<Background>) -> Self {
|
||||
lazy_static! {
|
||||
static ref LOCK: Mutex<()> = Mutex::new(());
|
||||
}
|
||||
static LOCK: Mutex<()> = Mutex::new(());
|
||||
|
||||
let _guard = LOCK.lock();
|
||||
let mut rng = StdRng::from_entropy();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue