summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG11
-rw-r--r--Cargo.toml8
-rw-r--r--src/lib.rs10
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 <me@iximeow.net>"]
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 {
+ <Self as yaxpeax_arch::DecodeError>::description(self)
+ }
+}
+
#[derive(Default)]
pub struct InstDecoder {}