aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2019-03-28 02:38:46 -0700
committeriximeow <me@iximeow.net>2020-01-12 16:10:13 -0800
commit2ae7a2ef1bfae5b76937e4ba79c0c5703c589bcc (patch)
tree88f9880964c1414d1a0ecb7cd70ee7276be15f95
parent24bff7b8845fd7c56943b1bc13864bd2a4f4a4f5 (diff)
fix benchmarks (decode changes a while ago and these were not rebuilt)
-rw-r--r--test/bench.rs4
1 files changed, 2 insertions, 2 deletions
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<Instruction> {
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) {