Skip to content

Commit a72469e

Browse files
committed
improv: Impl Error for DecodeError
1 parent a70aa33 commit a72469e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ keywords = [ "freedesktop", "desktop", "entry" ]
1414
[dependencies]
1515
dirs = "3"
1616
memchr = "2"
17+
thiserror = "1"

src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#[macro_use]
2+
extern crate thiserror;
3+
14
mod iter;
25

36
pub use self::iter::Iter;
@@ -13,8 +16,9 @@ pub type Locale<'a> = &'a str;
1316
pub type LocaleMap<'a> = BTreeMap<Locale<'a>, Value<'a>>;
1417
pub type Value<'a> = &'a str;
1518

16-
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
19+
#[derive(Debug, Copy, Clone, Error, PartialEq, Eq)]
1720
pub enum DecodeError {
21+
#[error("path does not contain a valid app ID")]
1822
AppID,
1923
}
2024

0 commit comments

Comments
 (0)