mirror of
https://github.com/encounter/objdiff.git
synced 2026-07-10 12:18:36 -07:00
clippy fixes & cargo update
This commit is contained in:
@@ -217,8 +217,8 @@ impl Arch for ArchMips {
|
||||
let instruction_flags = self.instruction_flags(diff_config);
|
||||
let mut ops = Vec::<InstructionRef>::with_capacity(code.len() / 4);
|
||||
let mut cur_addr = address as u32;
|
||||
for chunk in code.chunks_exact(4) {
|
||||
let code = self.endianness.read_u32(chunk.try_into()?);
|
||||
for chunk in code.as_chunks::<4>().0 {
|
||||
let code = self.endianness.read_u32(*chunk);
|
||||
let instruction =
|
||||
rabbitizer::Instruction::new(code, Vram::new(cur_addr), instruction_flags);
|
||||
let opcode = instruction.opcode() as u16;
|
||||
|
||||
@@ -35,8 +35,8 @@ impl Arch for ArchSuperH {
|
||||
let mut ops = Vec::<InstructionRef>::with_capacity(code.len() / 2);
|
||||
let mut offset = address;
|
||||
|
||||
for chunk in code.chunks_exact(2) {
|
||||
let opcode = u16::from_be_bytes(chunk.try_into().unwrap());
|
||||
for chunk in code.as_chunks::<2>().0 {
|
||||
let opcode = u16::from_be_bytes(*chunk);
|
||||
let mut parts: Vec<InstructionPart> = vec![];
|
||||
let resolved: ResolvedInstructionRef = Default::default();
|
||||
let mut branch_dest: Option<u64> = None;
|
||||
@@ -80,8 +80,8 @@ impl Arch for ArchSuperH {
|
||||
let mut data_offsets = BTreeMap::<u64, DataInfo>::new();
|
||||
|
||||
let mut pos: u64 = 0;
|
||||
for chunk in symbol_data.chunks_exact(2) {
|
||||
let opcode = u16::from_be_bytes(chunk.try_into().unwrap());
|
||||
for chunk in symbol_data.as_chunks::<2>().0 {
|
||||
let opcode = u16::from_be_bytes(*chunk);
|
||||
// mov.w
|
||||
if (opcode & 0xf000) == 0x9000 {
|
||||
let target = (opcode as u64 & 0xff) * 2 + 4 + pos;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#![allow(clippy::needless_lifetimes)] // Generated serde code
|
||||
#![allow(clippy::useless_borrows_in_formatting)] // Generated serde code
|
||||
|
||||
use alloc::{
|
||||
string::{String, ToString},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#![allow(clippy::needless_lifetimes)] // Generated serde code
|
||||
#![allow(clippy::useless_borrows_in_formatting)] // Generated serde code
|
||||
|
||||
use alloc::{
|
||||
string::{String, ToString},
|
||||
|
||||
Reference in New Issue
Block a user