Skip to content

Commit 6147231

Browse files
authored
Remove lazy_static: unnecessary since rust 1.63 (#556)
Signed-off-by: Greg Morenz <[email protected]>
1 parent 87cabf4 commit 6147231

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

mozjs/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ profilemozjs = ['mozjs_sys/profilemozjs']
1717
crown = ['mozjs_sys/crown']
1818

1919
[dependencies]
20-
lazy_static = "1"
2120
libc.workspace = true
2221
log = "0.4"
2322
mozjs_sys = { path = "../mozjs-sys" }

mozjs/src/rust.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ use crate::jsapi::{ToInt32Slow, ToInt64Slow, ToNumberSlow, ToStringSlow, ToUint1
6262
use crate::jsapi::{ToUint32Slow, ToUint64Slow, ToWindowProxyIfWindowSlow};
6363
use crate::jsval::ObjectValue;
6464
use crate::panic::maybe_resume_unwind;
65-
use lazy_static::lazy_static;
6665
use log::{debug, warn};
6766
use mozjs_sys::jsapi::JS::SavedFrameResult;
6867
pub use mozjs_sys::jsgc::{GCMethods, IntoHandle, IntoMutableHandle};
@@ -159,9 +158,7 @@ enum EngineState {
159158
ShutDown,
160159
}
161160

162-
lazy_static! {
163-
static ref ENGINE_STATE: Mutex<EngineState> = Mutex::new(EngineState::Uninitialized);
164-
}
161+
static ENGINE_STATE: Mutex<EngineState> = Mutex::new(EngineState::Uninitialized);
165162

166163
#[derive(Debug)]
167164
pub enum JSEngineError {

0 commit comments

Comments
 (0)