Skip to content

Commit

Permalink
impl core::error::Error for Error
Browse files Browse the repository at this point in the history
  • Loading branch information
jordens committed Oct 1, 2024
1 parent db812f7 commit 6c7ecfb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

* For `Runner::input_byte` the buffer `B` does not need to be `Sized`

### Added

* `impl core::error::Error for Error`

## [v0.6.0] - 2024-08-30

### Changed
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ license = "MIT OR Apache-2.0"
edition = "2021"
repository = "https://github.com/rust-embedded-community/menu"
readme = "README.md"
rust-version = "1.81.0"

[dependencies]
embedded-io = "0.6.1"
Expand Down
8 changes: 8 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ pub enum Error {
NotFound,
}

impl core::fmt::Display for Error {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
core::fmt::Debug::fmt(self, f)
}
}

impl core::error::Error for Error {}

/// Looks for the named parameter in the parameter list of the item, then
/// finds the correct argument.
///
Expand Down

0 comments on commit 6c7ecfb

Please sign in to comment.