From 9e9b65f4bad3bda5d340f2a4e9f8a73d817f97ab Mon Sep 17 00:00:00 2001 From: Expyron <5100376+Expyron@users.noreply.github.com> Date: Mon, 16 Jun 2025 13:29:14 +0200 Subject: [PATCH] chore: Use const init for Mutex --- Cargo.toml | 1 - tests/color_format.rs | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ad552c7..bf778c8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,7 +39,6 @@ rustversion = "1.0" trybuild = { version = "1.0.89", features = ["diff"] } syn = { version = "2.0.87", features = ["full"] } regex = "1.10" -lazy_static = "1.4" serde = { version = "1.0.196", features = ["derive"] } serde_json = "1.0.113" diff --git a/tests/color_format.rs b/tests/color_format.rs index 95d40e0..e5418ec 100644 --- a/tests/color_format.rs +++ b/tests/color_format.rs @@ -1,6 +1,5 @@ #![cfg(feature = "fancy-no-backtrace")] -use lazy_static::lazy_static; use miette::{Diagnostic, MietteHandler, MietteHandlerOpts, ReportHandler, RgbColors}; use regex::Regex; use std::ffi::OsString; @@ -69,9 +68,8 @@ impl Drop for EnvVarGuard<'_> { } } -lazy_static! { - static ref COLOR_ENV_VARS: Mutex<()> = Mutex::new(()); -} +static COLOR_ENV_VARS: Mutex<()> = Mutex::new(()); + /// Assert the color format used by a handler with different levels of terminal /// support.