diff --git a/Cargo.toml b/Cargo.toml index 90313c9..4e6c09a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,6 @@ implot-sys = { version = "0.4.0", path = "implot-sys" } imgui = { version = "=0.6.0" } bitflags = "1.0" parking_lot = "0.11" -lazy_static = "1.1" rustversion = "1.0.4" diff --git a/src/context.rs b/src/context.rs index 597b11d..b0ef496 100644 --- a/src/context.rs +++ b/src/context.rs @@ -17,10 +17,8 @@ pub struct Context { raw: *mut sys::ImPlotContext, } -lazy_static::lazy_static! { - // This mutex is used to guard any accesses to the context - static ref CTX_MUTEX: ReentrantMutex<()> = ReentrantMutex::new(()); -} +// This mutex is used to guard any accesses to the context +static CTX_MUTEX: ReentrantMutex<()> = parking_lot::const_reentrant_mutex(()); fn no_current_context() -> bool { let ctx = unsafe { sys::ImPlot_GetCurrentContext() };