Skip to content

Commit

Permalink
Merge pull request #255 from rust-embedded/enum-error
Browse files Browse the repository at this point in the history
use close range in EnumeratedValue error message
  • Loading branch information
Emilgardis authored Dec 31, 2023
2 parents 50ee4f7 + 2cd5c35 commit ded7ef5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions svd-rs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

- use close range in `EnumeratedValue` error message

## [v0.14.6] - 2023-11-29

- fix `validate` on `Disabled` level, remove `mut`
Expand Down
2 changes: 1 addition & 1 deletion svd-rs/src/enumeratedvalue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub enum Error {
#[error("EnumeratedValue with `value` (passed {0:?}) should not have `is_default(True)`")]
ValueAndDefault(Option<u64>),
/// The value is not in range.
#[error("Value {0} out of range {1:?}")]
#[error("Value {0} out of range [{} - {}]", .1.start, .1.end - 1)]
OutOfRange(u64, core::ops::Range<u64>),
}

Expand Down

0 comments on commit ded7ef5

Please sign in to comment.