Skip to content

Commit 3956699

Browse files
committed
Make error enums non_exhaustive
This will allow us to add variants without them being breaking changes, and I don't think you should be exhaustively matching our errors regardless.
1 parent 88fd134 commit 3956699

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/aml/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2579,10 +2579,8 @@ pub enum Operation {
25792579
ParseResource,
25802580
}
25812581

2582-
/*
2583-
* TODO: not sure if we should use a better error reporting system or just keep a giant enum?
2584-
*/
25852582
#[derive(Clone, PartialEq, Debug)]
2583+
#[non_exhaustive]
25862584
pub enum AmlError {
25872585
RunOutOfStream,
25882586
IllegalOpcode(u16),

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ pub unsafe trait AcpiTable {
235235
}
236236

237237
#[derive(Clone, Debug)]
238+
#[non_exhaustive]
238239
pub enum AcpiError {
239240
NoValidRsdp,
240241
RsdpIncorrectSignature,

0 commit comments

Comments
 (0)