From c216e625815ce15d1c73cecd064888a843cca472 Mon Sep 17 00:00:00 2001 From: iximeow Date: Thu, 1 Jul 2021 01:10:32 -0700 Subject: complete yaxpeax-arch 0.1.0 adaptation, shore up .mem_size() --- 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 486fa6e..bf73b1b 100644 --- a/test/bench.rs +++ b/test/bench.rs @@ -87,11 +87,11 @@ const DECODE_DATA: [u8; 130] = [ fn do_decode_swathe() { // let mut buf = [0u8; 128]; - let mut iter = DECODE_DATA.iter().map(|x| *x); let mut result = yaxpeax_x86::long_mode::Instruction::invalid(); + let mut reader = yaxpeax_arch::U8Reader::new(&DECODE_DATA[..]); let decoder = yaxpeax_x86::long_mode::InstDecoder::default(); loop { - match decoder.decode_into(&mut result, &mut iter) { + match decoder.decode_into(&mut result, &mut reader) { Ok(()) => { #[cfg(feature = "capstone_bench")] test::black_box(write!(&mut buf[..], "{}", result)); -- cgit v1.1