Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove lazy_static (unnecessary since rust 1.63) #556

Merged
merged 1 commit into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion mozjs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
5 changes: 1 addition & 4 deletions mozjs/src/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -159,9 +158,7 @@ enum EngineState {
ShutDown,
}

lazy_static! {
static ref ENGINE_STATE: Mutex<EngineState> = Mutex::new(EngineState::Uninitialized);
}
static ENGINE_STATE: Mutex<EngineState> = Mutex::new(EngineState::Uninitialized);

#[derive(Debug)]
pub enum JSEngineError {
Expand Down
Loading