Skip to content

Commit

Permalink
Clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
encounter committed Aug 16, 2023
1 parent 23a156a commit 933edcf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/cmd/dol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,7 @@ fn apply_selfile(obj: &mut ObjInfo, selfile: &Path) -> Result<()> {
demangled_name: symbol.demangled_name.clone(),
address: address as u64,
section,
flags: ObjSymbolFlagSet(
(ObjSymbolFlags::Global | ObjSymbolFlags::ForceActive).into(),
),
flags: ObjSymbolFlagSet(ObjSymbolFlags::Global | ObjSymbolFlags::ForceActive),
..*symbol
},
false,
Expand All @@ -267,8 +265,8 @@ fn info(args: InfoArgs) -> Result<()> {

apply_signatures_post(&mut obj)?;

if let Some(selfile) = args.selfile {
apply_selfile(&mut obj, &selfile)?;
if let Some(selfile) = &args.selfile {
apply_selfile(&mut obj, selfile)?;
}

println!("{}:", obj.name);
Expand Down Expand Up @@ -437,7 +435,7 @@ fn split(args: SplitArgs) -> Result<()> {
if let Some(hash) = &config.selfile_hash {
verify_hash(selfile, hash)?;
}
apply_selfile(&mut obj, &selfile)?;
apply_selfile(&mut obj, selfile)?;
}

log::info!("Performing relocation analysis");
Expand Down
1 change: 1 addition & 0 deletions src/util/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ fn write_data<W: Write>(
break;
}
if let Some((&sym_addr, vec)) = entry {
#[allow(clippy::comparison_chain)]
if current_address == sym_addr {
for entry in vec {
if entry.kind == SymbolEntryKind::End && begin {
Expand Down

0 comments on commit 933edcf

Please sign in to comment.