mirror of https://github.com/zkat/miette.git
feat(deps): remove once_cell dep in favor of `std::sync::OnceLock`
BREAKING CHANGE: This requires an MSRV bump to 1.70.0.
This commit is contained in:
parent
e5c7ae469e
commit
4c48584f30
|
|
@ -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 }
|
||||
|
|
|
|||
|
|
@ -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<dyn Fn(&(dyn Diagnostic + 'static)) -> Box<dyn ReportHandler> + Sync + Send + 'static>;
|
||||
|
||||
static HOOK: OnceCell<ErrorHook> = OnceCell::new();
|
||||
static HOOK: OnceLock<ErrorHook> = OnceLock::new();
|
||||
|
||||
/// Error indicating that [`set_hook()`] was unable to install the provided
|
||||
/// [`ErrorHook`].
|
||||
|
|
|
|||
Loading…
Reference in New Issue