From e6ee65efa4e98ff5c1541d4277b76edaf1d33e51 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 4 Jul 2021 16:29:33 -0700 Subject: update yaxpeax-arch to 0.2.0 and update DecodeError impls --- Cargo.toml | 4 ++-- src/long_mode/mod.rs | 9 +++++++++ src/protected_mode/mod.rs | 9 +++++++++ src/real_mode/mod.rs | 9 +++++++++ 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 94c247d..657a6ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "yaxpeax-x86" -version = "0.3.0" +version = "1.0.0" authors = [ "iximeow " ] license = "0BSD" repository = "http://git.iximeow.net/yaxpeax-x86/" @@ -10,7 +10,7 @@ readme = "README.md" edition = "2018" [dependencies] -yaxpeax-arch = { version = "0.1.0", default-features = false, features = [] } +yaxpeax-arch = { version = "0.2.0", default-features = false, features = [] } "num-traits" = { version = "0.2", default-features = false } "serde" = { version = "1.0", optional = true } "serde_json" = { version = "1.0", optional = true } diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs index be7cedd..e967f4b 100644 --- a/src/long_mode/mod.rs +++ b/src/long_mode/mod.rs @@ -2732,6 +2732,15 @@ 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) + } +} + #[allow(non_camel_case_types)] #[derive(Debug, Copy, Clone, Eq, PartialEq)] enum OperandSpec { diff --git a/src/protected_mode/mod.rs b/src/protected_mode/mod.rs index 355ae17..6e503a0 100644 --- a/src/protected_mode/mod.rs +++ b/src/protected_mode/mod.rs @@ -2671,6 +2671,15 @@ 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) + } +} + #[allow(non_camel_case_types)] #[derive(Debug, Copy, Clone, Eq, PartialEq)] enum OperandSpec { diff --git a/src/real_mode/mod.rs b/src/real_mode/mod.rs index e752ee0..6913fb4 100644 --- a/src/real_mode/mod.rs +++ b/src/real_mode/mod.rs @@ -2679,6 +2679,15 @@ 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) + } +} + #[allow(non_camel_case_types)] #[derive(Debug, Copy, Clone, Eq, PartialEq)] enum OperandSpec { -- cgit v1.1