mirror of https://github.com/zkat/miette.git
feat(protocol): implement `Ord` for `Severity` (#240)
Fixes: https://github.com/zkat/miette/issues/239
This commit is contained in:
parent
3497508aa9
commit
ed486c959d
|
|
@ -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
|
||||
[`Diagnostic`]s are displayed.
|
||||
*/
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
||||
#[derive(Copy, Clone, Debug, Eq, Ord, PartialEq, PartialOrd)]
|
||||
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.
|
||||
Advice,
|
||||
/// Warning. Please take note.
|
||||
Warning,
|
||||
/// Critical failure. The program cannot continue.
|
||||
Error,
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue