From d1de407ea3a157e7b0aa39ac03e5d16a001bd783 Mon Sep 17 00:00:00 2001 From: iximeow Date: Mon, 30 Sep 2019 00:20:03 -0700 Subject: warnings-b-gone --- src/display.rs | 10 +++------- src/lib.rs | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/display.rs b/src/display.rs index b51ae9b..4593f20 100644 --- a/src/display.rs +++ b/src/display.rs @@ -1,12 +1,8 @@ use ::{MSP430, Operand, Opcode, Instruction, Width}; -use std::collections::HashMap; use std::fmt::{Display, Formatter}; -use std::hash::Hash; -use std::rc::Rc; use std; -use termion::color; -use yaxpeax_arch::{Arch, Colorize, ColorSettings, LengthedInstruction, ShowContextual}; +use yaxpeax_arch::{Arch, Colorize, ColorSettings, ShowContextual}; impl Display for Instruction { fn fmt(&self, f: &mut Formatter) -> Result<(), std::fmt::Error> { @@ -17,7 +13,7 @@ impl Display for Instruction { } 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, "{}", self.opcode)?; match self.op_width { Width::B => { write!(out, ".b")? }, @@ -84,7 +80,7 @@ impl Display for Operand { } 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 { fn signed_hex(num: i16) -> String { if num >= 0 { format!("+{:#x}", num) diff --git a/src/lib.rs b/src/lib.rs index 7ba7a95..e312bd7 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; -- cgit v1.1