aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2021-05-07 00:12:19 -0700
committeriximeow <me@iximeow.net>2021-05-07 00:12:19 -0700
commit2ad06203b892a1b6bc3ea9769066d1a959aef690 (patch)
treeb4eaf4f16e38c7fe519c6d53bef656aa147a3478
parent9efb3703630662bb0fee9f5224ac4c91c32741d1 (diff)
update yaxpeax-arch to 0.0.5, fix interface breakages
-rw-r--r--Cargo.toml2
-rw-r--r--src/long_mode/display.rs14
-rw-r--r--src/protected_mode/display.rs14
3 files changed, 15 insertions, 15 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 4a8f72b..875e9b5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -9,7 +9,7 @@ description = "x86 decoders for the yaxpeax project"
readme = "README.md"
[dependencies]
-yaxpeax-arch = { version = "0.0.4", default-features = false, features = [] }
+yaxpeax-arch = { version = "0.0.5", 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/display.rs b/src/long_mode/display.rs
index 3631800..1d68719 100644
--- a/src/long_mode/display.rs
+++ b/src/long_mode/display.rs
@@ -143,7 +143,7 @@ impl fmt::Display for Operand {
}
}
-impl <T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> Colorize<T, Color, Y> for Operand {
+impl <T: fmt::Write, Y: YaxColors> Colorize<T, Y> for Operand {
fn colorize(&self, colors: &Y, f: &mut T) -> fmt::Result {
match self {
&Operand::ImmediateU8(imm) => {
@@ -1325,7 +1325,7 @@ impl Opcode {
}
}
-impl <T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> Colorize<T, Color, Y> for Opcode {
+impl <T: fmt::Write, Y: YaxColors> Colorize<T, Y> for Opcode {
fn colorize(&self, colors: &Y, out: &mut T) -> fmt::Result {
match self {
Opcode::VHADDPS |
@@ -2434,7 +2434,7 @@ pub struct InstructionDisplayer<'instr> {
* so write to some Write thing i guess. bite me. i really just want to
* stop thinking about how to support printing instructions...
*/
-impl <'instr, T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> Colorize<T, Color, Y> for InstructionDisplayer<'instr> {
+impl <'instr, T: fmt::Write, Y: YaxColors> Colorize<T, Y> for InstructionDisplayer<'instr> {
fn colorize(&self, colors: &Y, out: &mut T) -> fmt::Result {
// TODO: I DONT LIKE THIS, there is no address i can give contextualize here,
// the address operand maybe should be optional..
@@ -2451,7 +2451,7 @@ impl Instruction {
}
}
-fn contextualize_intel<T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>>(instr: &Instruction, colors: &Y, _address: u64, _context: Option<&NoContext>, out: &mut T) -> fmt::Result {
+fn contextualize_intel<T: fmt::Write, Y: YaxColors>(instr: &Instruction, colors: &Y, _address: u64, _context: Option<&NoContext>, out: &mut T) -> fmt::Result {
if instr.prefixes.lock() {
write!(out, "lock ")?;
}
@@ -2546,7 +2546,7 @@ fn contextualize_intel<T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>>(
Ok(())
}
-fn contextualize_c<T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>>(instr: &Instruction, _colors: &Y, _address: u64, _context: Option<&NoContext>, out: &mut T) -> fmt::Result {
+fn contextualize_c<T: fmt::Write, Y: YaxColors>(instr: &Instruction, _colors: &Y, _address: u64, _context: Option<&NoContext>, out: &mut T) -> fmt::Result {
let mut brace_count = 0;
if instr.prefixes.lock() {
@@ -2764,7 +2764,7 @@ fn contextualize_c<T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>>(inst
Ok(())
}
-impl <'instr, T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> ShowContextual<u64, NoContext, Color, T, Y> for InstructionDisplayer<'instr> {
+impl <'instr, T: fmt::Write, Y: YaxColors> ShowContextual<u64, NoContext, T, Y> for InstructionDisplayer<'instr> {
fn contextualize(&self, colors: &Y, address: u64, context: Option<&NoContext>, out: &mut T) -> fmt::Result {
let InstructionDisplayer {
instr,
@@ -2783,7 +2783,7 @@ impl <'instr, T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> ShowConte
}
#[cfg(feature="std")]
-impl <T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> ShowContextual<u64, [Option<alloc::string::String>], Color, T, Y> for Instruction {
+impl <T: fmt::Write, Y: YaxColors> ShowContextual<u64, [Option<alloc::string::String>], T, Y> for Instruction {
fn contextualize(&self, colors: &Y, _address: u64, context: Option<&[Option<alloc::string::String>]>, out: &mut T) -> fmt::Result {
if self.prefixes.lock() {
write!(out, "lock ")?;
diff --git a/src/protected_mode/display.rs b/src/protected_mode/display.rs
index ffb1acc..e51d2dc 100644
--- a/src/protected_mode/display.rs
+++ b/src/protected_mode/display.rs
@@ -139,7 +139,7 @@ impl fmt::Display for Operand {
}
}
-impl <T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> Colorize<T, Color, Y> for Operand {
+impl <T: fmt::Write, Y: YaxColors> Colorize<T, Y> for Operand {
fn colorize(&self, colors: &Y, f: &mut T) -> fmt::Result {
match self {
&Operand::ImmediateU8(imm) => {
@@ -1325,7 +1325,7 @@ impl Opcode {
}
}
-impl <T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> Colorize<T, Color, Y> for Opcode {
+impl <T: fmt::Write, Y: YaxColors> Colorize<T, Y> for Opcode {
fn colorize(&self, colors: &Y, out: &mut T) -> fmt::Result {
match self {
Opcode::VHADDPS |
@@ -2445,7 +2445,7 @@ pub struct InstructionDisplayer<'instr> {
* so write to some Write thing i guess. bite me. i really just want to
* stop thinking about how to support printing instructions...
*/
-impl <'instr, T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> Colorize<T, Color, Y> for InstructionDisplayer<'instr> {
+impl <'instr, T: fmt::Write, Y: YaxColors> Colorize<T, Y> for InstructionDisplayer<'instr> {
fn colorize(&self, colors: &Y, out: &mut T) -> fmt::Result {
// TODO: I DONT LIKE THIS, there is no address i can give contextualize here,
// the address operand maybe should be optional..
@@ -2462,7 +2462,7 @@ impl Instruction {
}
}
-fn contextualize_intel<T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>>(instr: &Instruction, colors: &Y, _address: u32, _context: Option<&NoContext>, out: &mut T) -> fmt::Result {
+fn contextualize_intel<T: fmt::Write, Y: YaxColors>(instr: &Instruction, colors: &Y, _address: u32, _context: Option<&NoContext>, out: &mut T) -> fmt::Result {
if instr.prefixes.lock() {
write!(out, "lock ")?;
}
@@ -2557,7 +2557,7 @@ fn contextualize_intel<T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>>(
Ok(())
}
-fn contextualize_c<T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>>(instr: &Instruction, _colors: &Y, _address: u32, _context: Option<&NoContext>, out: &mut T) -> fmt::Result {
+fn contextualize_c<T: fmt::Write, Y: YaxColors>(instr: &Instruction, _colors: &Y, _address: u32, _context: Option<&NoContext>, out: &mut T) -> fmt::Result {
let mut brace_count = 0;
if instr.prefixes.lock() {
@@ -2775,7 +2775,7 @@ fn contextualize_c<T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>>(inst
Ok(())
}
-impl <'instr, T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> ShowContextual<u32, NoContext, Color, T, Y> for InstructionDisplayer<'instr> {
+impl <'instr, T: fmt::Write, Y: YaxColors> ShowContextual<u32, NoContext, T, Y> for InstructionDisplayer<'instr> {
fn contextualize(&self, colors: &Y, address: u32, context: Option<&NoContext>, out: &mut T) -> fmt::Result {
let InstructionDisplayer {
instr,
@@ -2794,7 +2794,7 @@ impl <'instr, T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> ShowConte
}
#[cfg(feature="std")]
-impl <T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> ShowContextual<u64, [Option<alloc::string::String>], Color, T, Y> for Instruction {
+impl <T: fmt::Write, Y: YaxColors> ShowContextual<u64, [Option<alloc::string::String>], T, Y> for Instruction {
fn contextualize(&self, colors: &Y, _address: u64, context: Option<&[Option<alloc::string::String>]>, out: &mut T) -> fmt::Result {
if self.prefixes.lock() {
write!(out, "lock ")?;