mirror of
https://github.com/encounter/objdiff.git
synced 2025-06-07 07:03:39 +00:00
Apply clippy suggestion
This commit is contained in:
parent
d8fdfaa2c0
commit
485b259c32
@ -1,4 +1,5 @@
|
||||
use alloc::{boxed::Box, format, string::String, vec::Vec};
|
||||
use core::cmp::Ordering;
|
||||
|
||||
use anyhow::{Context, Result, anyhow, bail};
|
||||
use iced_x86::{
|
||||
@ -100,9 +101,11 @@ impl Arch for ArchX86 {
|
||||
'outer: while decoder.can_decode() {
|
||||
let address = decoder.ip();
|
||||
while let Some(reloc) = reloc_iter.peek() {
|
||||
if reloc.address < address {
|
||||
match reloc.address.cmp(&address) {
|
||||
Ordering::Less => {
|
||||
reloc_iter.next();
|
||||
} else if reloc.address == address {
|
||||
}
|
||||
Ordering::Equal => {
|
||||
// If the instruction starts at a relocation, it's inline data
|
||||
let size = self.reloc_size(reloc.flags).with_context(|| {
|
||||
format!("Unsupported inline x86 relocation {:?}", reloc.flags)
|
||||
@ -120,8 +123,8 @@ impl Arch for ArchX86 {
|
||||
reloc_iter.next();
|
||||
continue 'outer;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
Ordering::Greater => break,
|
||||
}
|
||||
}
|
||||
decoder.decode_out(&mut instruction);
|
||||
|
Loading…
x
Reference in New Issue
Block a user