From 797c054b01248bbf3ca4cb3df75629d1da2a36c7 Mon Sep 17 00:00:00 2001 From: Greg Morenz Date: Sun, 2 Mar 2025 20:02:08 -0500 Subject: [PATCH] Remove lazy_static: unnecessary since rust 1.63 Signed-off-by: Greg Morenz --- mozjs/Cargo.toml | 1 - mozjs/src/rust.rs | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/mozjs/Cargo.toml b/mozjs/Cargo.toml index db288c6dcf..51b0667b47 100644 --- a/mozjs/Cargo.toml +++ b/mozjs/Cargo.toml @@ -17,7 +17,6 @@ profilemozjs = ['mozjs_sys/profilemozjs'] crown = ['mozjs_sys/crown'] [dependencies] -lazy_static = "1" libc.workspace = true log = "0.4" mozjs_sys = { path = "../mozjs-sys" } diff --git a/mozjs/src/rust.rs b/mozjs/src/rust.rs index 35189e8806..bfa2ab0c20 100644 --- a/mozjs/src/rust.rs +++ b/mozjs/src/rust.rs @@ -62,7 +62,6 @@ use crate::jsapi::{ToInt32Slow, ToInt64Slow, ToNumberSlow, ToStringSlow, ToUint1 use crate::jsapi::{ToUint32Slow, ToUint64Slow, ToWindowProxyIfWindowSlow}; use crate::jsval::ObjectValue; use crate::panic::maybe_resume_unwind; -use lazy_static::lazy_static; use log::{debug, warn}; use mozjs_sys::jsapi::JS::SavedFrameResult; pub use mozjs_sys::jsgc::{GCMethods, IntoHandle, IntoMutableHandle}; @@ -159,9 +158,7 @@ enum EngineState { ShutDown, } -lazy_static! { - static ref ENGINE_STATE: Mutex = Mutex::new(EngineState::Uninitialized); -} +static ENGINE_STATE: Mutex = Mutex::new(EngineState::Uninitialized); #[derive(Debug)] pub enum JSEngineError {