mirror of https://github.com/zkat/miette.git
feat(protocol): implement `Ord` for `Severity`
This commit is contained in:
parent
3497508aa9
commit
fe6217a8ec
|
|
@ -162,14 +162,14 @@ impl From<Box<dyn std::error::Error + Send + Sync>> for Box<dyn Diagnostic + Sen
|
||||||
[`ReportHandler`](crate::ReportHandler)s to change the way different
|
[`ReportHandler`](crate::ReportHandler)s to change the way different
|
||||||
[`Diagnostic`]s are displayed.
|
[`Diagnostic`]s are displayed.
|
||||||
*/
|
*/
|
||||||
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
#[derive(Copy, Clone, Debug, Eq, Ord, PartialEq, PartialOrd)]
|
||||||
pub enum Severity {
|
pub enum Severity {
|
||||||
/// Critical failure. The program cannot continue.
|
|
||||||
Error,
|
|
||||||
/// Warning. Please take note.
|
|
||||||
Warning,
|
|
||||||
/// Just some help. Here's how you could be doing it better.
|
/// Just some help. Here's how you could be doing it better.
|
||||||
Advice,
|
Advice,
|
||||||
|
/// Warning. Please take note.
|
||||||
|
Warning,
|
||||||
|
/// Critical failure. The program cannot continue.
|
||||||
|
Error,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue