Skip to content

Commit ed486c9

Browse files
authoredMar 1, 2023
feat(protocol): implement Ord for Severity (#240)
Fixes: #239
1 parent 3497508 commit ed486c9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎src/protocol.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,14 @@ impl From<Box<dyn std::error::Error + Send + Sync>> for Box<dyn Diagnostic + Sen
162162
[`ReportHandler`](crate::ReportHandler)s to change the way different
163163
[`Diagnostic`]s are displayed.
164164
*/
165-
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
165+
#[derive(Copy, Clone, Debug, Eq, Ord, PartialEq, PartialOrd)]
166166
pub enum Severity {
167-
/// Critical failure. The program cannot continue.
168-
Error,
169-
/// Warning. Please take note.
170-
Warning,
171167
/// Just some help. Here's how you could be doing it better.
172168
Advice,
169+
/// Warning. Please take note.
170+
Warning,
171+
/// Critical failure. The program cannot continue.
172+
Error,
173173
}
174174

175175
/**

0 commit comments

Comments
 (0)
Please sign in to comment.