feat(protocol): implement `Ord` for `Severity` (#240)

Fixes: https://github.com/zkat/miette/issues/239
This commit is contained in:
Erich Gubler 2023-03-01 18:48:11 -05:00 committed by GitHub
parent 3497508aa9
commit ed486c959d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -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,
}
/**