Skip to content

Commit

Permalink
fix: don't panic on invalid error
Browse files Browse the repository at this point in the history
  • Loading branch information
Aloso committed Dec 21, 2024
1 parent 81b3985 commit 06ae013
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pomsky-bin/src/result/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ pub enum Kind {
Unsupported,
Deprecated,
Limits,
Invalid,
Test,
Other,
}
Expand All @@ -225,6 +226,7 @@ impl Kind {
Kind::Unsupported => "unsupported",
Kind::Deprecated => "deprecated",
Kind::Limits => "limits",
Kind::Invalid => "invalid",
Kind::Test => "test",
Kind::Other => "other",
}
Expand All @@ -240,6 +242,7 @@ impl From<DiagnosticKind> for Kind {
DiagnosticKind::Unsupported => Kind::Unsupported,
DiagnosticKind::Deprecated => Kind::Deprecated,
DiagnosticKind::Limits => Kind::Limits,
DiagnosticKind::Invalid => Kind::Invalid,
DiagnosticKind::Test => Kind::Test,
DiagnosticKind::Other => Kind::Other,
_ => panic!("unknown diagnostic kind"),
Expand Down

0 comments on commit 06ae013

Please sign in to comment.