Skip to content

Commit 94bdf81

Browse files
committed
Misc rust fmt
1 parent 79f287f commit 94bdf81

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

rust/src/low_level_il/expression.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,8 @@ where
596596
visit!(op.source_mem_expr());
597597
}
598598
// Do not have any sub expressions.
599-
Pop(_) | Reg(_) | RegSplit(_) | Const(_) | ConstPtr(_) | Flag(_) | FlagBit(_) | ExternPtr(_) | FlagCond(_) | FlagGroup(_) | Unimpl(_) | Undef(_) => {}
599+
Pop(_) | Reg(_) | RegSplit(_) | Const(_) | ConstPtr(_) | Flag(_) | FlagBit(_)
600+
| ExternPtr(_) | FlagCond(_) | FlagGroup(_) | Unimpl(_) | Undef(_) => {}
600601
}
601602

602603
VisitorAction::Sibling

rust/src/low_level_il/instruction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414

1515
use super::operation;
1616
use super::operation::Operation;
17+
use super::VisitorAction;
1718
use super::*;
1819
use crate::architecture::Architecture;
1920
use binaryninjacore_sys::BNGetLowLevelILByIndex;
2021
use binaryninjacore_sys::BNGetLowLevelILIndexForInstruction;
2122
use binaryninjacore_sys::BNLowLevelILInstruction;
2223
use std::fmt::{Debug, Display, Formatter};
23-
use super::VisitorAction;
2424

2525
#[repr(transparent)]
2626
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]

rust/tests/low_level_il.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,11 @@ fn test_llil_visitor(_session: &Session) {
200200
// This is a flag instruction removed in LLIL.
201201
instructions_visited.push(LowLevelInstructionIndex(38));
202202
for instr_idx in 0..41 {
203-
if instructions_visited.iter().find(|x| x.0 == instr_idx).is_none() {
203+
if instructions_visited
204+
.iter()
205+
.find(|x| x.0 == instr_idx)
206+
.is_none()
207+
{
204208
panic!("Instruction with index {:?} not visited", instr_idx);
205209
};
206210
}
@@ -215,7 +219,11 @@ fn test_llil_visitor(_session: &Session) {
215219
expressions_visited.push(LowLevelExpressionIndex(116));
216220
expressions_visited.push(LowLevelExpressionIndex(121));
217221
for expr_idx in 0..127 {
218-
if expressions_visited.iter().find(|x| x.0 == expr_idx).is_none() {
222+
if expressions_visited
223+
.iter()
224+
.find(|x| x.0 == expr_idx)
225+
.is_none()
226+
{
219227
panic!("Expression with index {:?} not visited", expr_idx);
220228
};
221229
}

0 commit comments

Comments
 (0)