From 9e46e4718e6c31b4f9ae35ff4a0e65d206b8e688 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 18 Jan 2020 14:31:58 -0800 Subject: make NoContext public, move to yaxpeax-arch crate --- src/display.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/display.rs') diff --git a/src/display.rs b/src/display.rs index f523e65..d9b8f10 100644 --- a/src/display.rs +++ b/src/display.rs @@ -2,7 +2,7 @@ use ::{MSP430, Operand, Opcode, Instruction, Width, DecodeError}; use std::fmt::{self, Display, Formatter}; use std; -use yaxpeax_arch::{Arch, Colorize, ColorSettings, NoColors, ShowContextual, YaxColors}; +use yaxpeax_arch::{Arch, Colorize, NoColors, ShowContextual, YaxColors}; impl Display for Instruction { fn fmt(&self, f: &mut Formatter) -> Result<(), std::fmt::Error> { @@ -23,7 +23,7 @@ impl fmt::Display for DecodeError { } /// No per-operand when contextualizing an instruction. -struct NoContext; +pub struct NoContext; impl > ShowContextual<::Address, NoContext, Color, T, Y> for Instruction { fn contextualize(&self, _colors: &Y, _address: ::Address, _context: Option<&NoContext>, out: &mut T) -> std::fmt::Result { @@ -50,7 +50,7 @@ impl > ShowContextu #[cfg(feature="std")] impl > ShowContextual<::Address, [Option], Color, T, Y> for Instruction { - fn contextualize(&self, _colors: Option<&ColorSettings>, _address: ::Address, _context: Option<&[Option]>, out: &mut T) -> std::fmt::Result { + fn contextualize(&self, _colors: &Y, _address: ::Address, _context: Option<&[Option]>, out: &mut T) -> std::fmt::Result { write!(out, "{}", self.opcode)?; match self.op_width { Width::B => { write!(out, ".b")? }, -- cgit v1.1