From 2ae7a2ef1bfae5b76937e4ba79c0c5703c589bcc Mon Sep 17 00:00:00 2001 From: iximeow Date: Thu, 28 Mar 2019 02:38:46 -0700 Subject: fix benchmarks (decode changes a while ago and these were not rebuilt) --- test/bench.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/bench.rs b/test/bench.rs index 1d7414d..cb18e7c 100644 --- a/test/bench.rs +++ b/test/bench.rs @@ -13,7 +13,7 @@ use yaxpeax_x86::{Instruction, Opcode, decode_one}; fn decode(bytes: &[u8]) -> Option { let mut instr = Instruction::invalid(); - match decode_one(bytes, &mut instr) { + match decode_one(bytes.iter().map(|x| *x), &mut instr) { Some(()) => Some(instr), None => None } @@ -81,7 +81,7 @@ const decode_data: [u8; 130] = [ fn do_decode_swathe() { let mut buf = [0u8; 128]; - let mut iter = decode_data.iter(); + let mut iter = decode_data.iter().map(|x| *x); let mut result = yaxpeax_x86::Instruction::invalid(); loop { match yaxpeax_x86::decode_one(&mut iter, &mut result) { -- cgit v1.1