Skip to content

Commit dec19b4

Browse files
committed
Mark result::Error as non-exhaustive
1 parent 8499f1a commit dec19b4

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

riscv-types/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99

1010
### Changed
1111

12+
- Mark `result::Error` as `#[non_exhaustive]` to allow non-breaking new variants
1213
- Renamed crate to `riscv-types` as per [#351](https://github.com/rust-embedded/riscv/issues/351)
1314

1415
## riscv-pac [v0.2.0] - 2024-10-19

riscv-types/src/result.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ pub type Result<T> = core::result::Result<T, Error>;
55

66
/// Represents error variants for the library.
77
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
8+
#[non_exhaustive]
89
pub enum Error {
910
/// Attempted out-of-bounds access.
1011
IndexOutOfBounds {

0 commit comments

Comments
 (0)