v2.0.0
This release overhauls the toplevel/main experience for miette
. It adds a
new Report
type based on eyre::Report
and overhauls various types to fit
into this model, as well as prepare for some future changes in
Rust that will make it possible to
integrate miette
directly with crates like eyre
instead of having to use
this specific Report
.
On top of that, it includes a couple of nice new features, such as
#[diagnostic(transparent)]
, which should be super useful when wrapping other
diagnostics with your own types!
Breaking Changes
- report: anyhow-ify DiagnosticReport (#35) (3f9da04b)
DiagnosticReport
is now justReport
, and is a different,eyre::Report
-like type.DiagnosticResult
is now justResult
..into_diagnostic()
now just transforms the error into aReport
.DiagnosticReportPrinter
has been replaced withReportHandler
set_printer
has been replaced byset_hook
code
is now optional..into_diagnostic()
no longer takes acode
argument.#[diagnostic]
is now optional when derivingDiagnostic
.
Features
- derive: Add
#[diagnostic(transparent,forward)]
(#36) (53f5d6d1) - Source: impl Source for str, &str (make &'static str usable for testing) (#40) (50c7a883)
- source: Remove bound
T: Clone
fromSource
implementation forCow
. (#42) (0427c9f9)