Skip to content

Commit

Permalink
Remove lazy_static dependency
Browse files Browse the repository at this point in the history
Mutex can now be constructed in const contexts,
so we don't need to lazily construct it anymore.
  • Loading branch information
jschwe committed Dec 10, 2024
1 parent 3432d2b commit 648bef3
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ readme = "README.md"

[dependencies]
libz-sys = { version = "1.1", optional = true }
lazy_static = "1.0"

[dev-dependencies]
dlopen = "0.1"
Expand Down
2 changes: 0 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#[macro_use]
extern crate lazy_static;
// This extern crates are needed for linking
#[cfg(test)]
extern crate dlopen;
Expand Down
4 changes: 1 addition & 3 deletions src/shaders/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ use std::slice;
use std::str;
use std::sync::Mutex;

lazy_static! {
static ref CONSTRUCT_COMPILER_LOCK: Mutex<()> = Mutex::new(());
}
static CONSTRUCT_COMPILER_LOCK: Mutex<()> = Mutex::new(());

pub fn initialize() -> Result<(), &'static str> {
if unsafe { GLSLangInitialize() } == 0 {
Expand Down

0 comments on commit 648bef3

Please sign in to comment.