diff --git a/Cargo.toml b/Cargo.toml index 7567d95..4833e59 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,6 @@ exclude = ["images/", "tests/", "miette-derive/"] [dependencies] thiserror = "1.0.40" miette-derive = { path = "miette-derive", version = "=5.10.0", optional = true } -once_cell = "1.8.0" unicode-width = "0.1.9" owo-colors = { version = "3.4.0", optional = true } diff --git a/src/eyreish/mod.rs b/src/eyreish/mod.rs index 0efceed..0dfd878 100644 --- a/src/eyreish/mod.rs +++ b/src/eyreish/mod.rs @@ -7,8 +7,7 @@ use core::fmt::Display; use std::error::Error as StdError; - -use once_cell::sync::OnceCell; +use std::sync::OnceLock; #[allow(unreachable_pub)] pub use into_diagnostic::*; @@ -62,7 +61,7 @@ unsafe impl Send for Report {} pub type ErrorHook = Box Box + Sync + Send + 'static>; -static HOOK: OnceCell = OnceCell::new(); +static HOOK: OnceLock = OnceLock::new(); /// Error indicating that [`set_hook()`] was unable to install the provided /// [`ErrorHook`].