Skip to content

Commit 06ae013

Browse files
committed
fix: don't panic on invalid error
1 parent 81b3985 commit 06ae013

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pomsky-bin/src/result/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ pub enum Kind {
212212
Unsupported,
213213
Deprecated,
214214
Limits,
215+
Invalid,
215216
Test,
216217
Other,
217218
}
@@ -225,6 +226,7 @@ impl Kind {
225226
Kind::Unsupported => "unsupported",
226227
Kind::Deprecated => "deprecated",
227228
Kind::Limits => "limits",
229+
Kind::Invalid => "invalid",
228230
Kind::Test => "test",
229231
Kind::Other => "other",
230232
}
@@ -240,6 +242,7 @@ impl From<DiagnosticKind> for Kind {
240242
DiagnosticKind::Unsupported => Kind::Unsupported,
241243
DiagnosticKind::Deprecated => Kind::Deprecated,
242244
DiagnosticKind::Limits => Kind::Limits,
245+
DiagnosticKind::Invalid => Kind::Invalid,
243246
DiagnosticKind::Test => Kind::Test,
244247
DiagnosticKind::Other => Kind::Other,
245248
_ => panic!("unknown diagnostic kind"),

0 commit comments

Comments
 (0)