Skip to content

Commit 9d95aa1

Browse files
committed
Fix formatting issues in x86.rs
1 parent c0c9812 commit 9d95aa1

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

objdiff-core/src/arch/x86.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,8 @@ impl Arch for ArchX86 {
137137
let indirect_array_size = reloc_iter
138138
.peek()
139139
.map(|next_reloc| {
140-
next_reloc
141-
.address
142-
.saturating_sub(indirect_array_address) as usize
140+
next_reloc.address.saturating_sub(indirect_array_address)
141+
as usize
143142
})
144143
.unwrap_or(max_size)
145144
.min(max_size);
@@ -154,7 +153,8 @@ impl Arch for ArchX86 {
154153
});
155154
}
156155
// move decoder to after the array (there can be multiple jump+indirect tables in one function)
157-
let _ = decoder.set_position(indirect_array_pos + indirect_array_size);
156+
let _ =
157+
decoder.set_position(indirect_array_pos + indirect_array_size);
158158
decoder.set_ip(indirect_array_address + indirect_array_size as u64);
159159
}
160160

@@ -833,7 +833,12 @@ mod test {
833833
let mut parts = Vec::new();
834834
arch.display_instruction(
835835
ResolvedInstructionRef {
836-
ins_ref: InstructionRef { address: 0x1234, size: 1, opcode: DATA_OPCODE, branch_dest: None },
836+
ins_ref: InstructionRef {
837+
address: 0x1234,
838+
size: 1,
839+
opcode: DATA_OPCODE,
840+
branch_dest: None,
841+
},
837842
code: &code,
838843
..Default::default()
839844
},

0 commit comments

Comments
 (0)