diff options
| author | KyleMiles <krm504@nyu.edu> | 2023-01-05 17:29:14 -0500 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2023-01-06 16:29:58 -0500 |
| commit | a154e45cce79b0c2264c1e1cd37a3d1bf5bc6154 (patch) | |
| tree | 11f436b720edfdf37819e9e83e7131d220687074 /rust/examples/basic_script | |
| parent | 52edc39a7081fd6662e14fbcd473adabbbc36c7a (diff) | |
Rust API: Lots and lots of clippy changes
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!(); } } } |
