From a2214183d1135598985d59da721017298443b673 Mon Sep 17 00:00:00 2001 From: iximeow Date: Mon, 30 Sep 2019 00:18:48 -0700 Subject: warnings-b-gone --- src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index c082214..2c0a001 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,8 +2,8 @@ #[macro_use] extern crate serde_derive; #[cfg(feature="use-serde")] extern crate serde; -#[cfg(feature="use-serde")] -use serde::{Serialize, Deserialize}; +//#[cfg(feature="use-serde")] +//use serde::{Serialize, Deserialize}; extern crate yaxpeax_arch; extern crate termion; @@ -468,7 +468,7 @@ impl Decodable for Instruction { } } -pub fn opcode_color(opcode: Opcode) -> &'static color::Fg<&'static color::Color> { +pub fn opcode_color(opcode: Opcode) -> &'static color::Fg<&'static dyn color::Color> { match opcode { Opcode::Invalid(_, _) => &color::Fg(&color::Red), Opcode::NOP => &color::Fg(&color::Blue), @@ -543,7 +543,7 @@ pub fn opcode_color(opcode: Opcode) -> &'static color::Fg<&'static color::Color> } impl Colorize for Operand { - fn colorize(&self, colors: Option<&ColorSettings>, out: &mut T) -> std::fmt::Result { + fn colorize(&self, _colors: Option<&ColorSettings>, out: &mut T) -> std::fmt::Result { match self { Operand::ImmediateU8(i) => { write!(out, "#{:02x}", i) @@ -569,7 +569,7 @@ impl Colorize for Operand { } impl ShowContextual<::Address, [Option], T> for Instruction { - fn contextualize(&self, colors: Option<&ColorSettings>, address: ::Address, context: Option<&[Option]>, out: &mut T) -> std::fmt::Result { + fn contextualize(&self, colors: Option<&ColorSettings>, _address: ::Address, context: Option<&[Option]>, out: &mut T) -> std::fmt::Result { write!(out, "{}{}{}", opcode_color(self.opcode), self.opcode, color::Fg(color::Reset))?; match self.opcode { -- cgit v1.1