From 82bac0e0e2ceebf15b3a70ab0908ffa9df2d0276 Mon Sep 17 00:00:00 2001 From: iximeow Date: Wed, 21 Jul 2021 00:16:57 -0700 Subject: fix incorrect changelog entry, DecodeError impl for yaxpeax_arch+std --- CHANGELOG | 11 +++++++++-- Cargo.toml | 8 +++++++- src/lib.rs | 10 ++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d8f56be..56949d5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,9 +1,16 @@ -## 0.1.4 +## 0.2.1 -update yaxpeax-arch to drop a dependency on termion +* fix incorrect `yaxpeax_arch::Arch` impl for `std`-enabled builds + (DecodeError did not implement `std::error::Error` in those build environments) + +## 0.2.0 update yaxpeax-arch to 0.2.x, involving a breaking change to decode APIs (sorry) +## 0.1.4 + +update yaxpeax-arch to drop a dependency on termion + ## 0.1.3 transpose Table 4-43 to fix decoding of `srlz.i` diff --git a/Cargo.toml b/Cargo.toml index 1738354..b1e7315 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yaxpeax-ia64" -version = "0.2.0" +version = "0.2.1" authors = ["iximeow "] edition = "2018" license = "0BSD" @@ -11,3 +11,9 @@ readme = "README.md" [dependencies] yaxpeax-arch = { version = "0.2.2", default-features = false, features = [] } bitvec = "0.19" + +[features] +default = ["std"] + +# opt-in for std-related Error impl - necessary to `?`-unwrap `DecodeError`. +std = [] diff --git a/src/lib.rs b/src/lib.rs index 7d6a1ce..1fcd9d0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1386,6 +1386,16 @@ impl yaxpeax_arch::DecodeError for DecodeError { } } } + +#[cfg(feature = "std")] +extern crate std; +#[cfg(feature = "std")] +impl std::error::Error for DecodeError { + fn description(&self) -> &str { + ::description(self) + } +} + #[derive(Default)] pub struct InstDecoder {} -- cgit v1.1