diff options
Diffstat (limited to 'rust/examples/basic_script')
| -rw-r--r-- | rust/examples/basic_script/src/main.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/rust/examples/basic_script/src/main.rs b/rust/examples/basic_script/src/main.rs index ae4554e8..e535f15f 100644 --- a/rust/examples/basic_script/src/main.rs +++ b/rust/examples/basic_script/src/main.rs @@ -18,19 +18,16 @@ fn main() { // TODO : This is intended to be refactored to be more nice to work with soon(TM) for addr in basic_block.as_ref() { print!(" {} ", addr); - match func.arch().instruction_text( + if let Some((_, tokens)) = func.arch().instruction_text( bv.read_buffer(addr, func.arch().max_instr_len()) .unwrap() .get_data(), addr, ) { - Some((_, tokens)) => { - tokens - .iter() - .for_each(|token| print!("{}", token.text().as_str())); - println!("") - } - _ => (), + tokens + .iter() + .for_each(|token| print!("{}", token.text().as_str())); + println!(); } } } |
