mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Fix clippy warnings
This commit is contained in:
parent
9cb0c00b2a
commit
d67371c351
1 changed files with 2 additions and 4 deletions
|
@ -1325,7 +1325,6 @@ fn surgery_macho_help(
|
|||
);
|
||||
}
|
||||
|
||||
let mut addend: Option<i64> = None;
|
||||
let mut subtractor: Option<SymbolIndex> = None;
|
||||
for rel in sec.relocations() {
|
||||
if verbose {
|
||||
|
@ -1395,7 +1394,7 @@ fn surgery_macho_help(
|
|||
}
|
||||
RelocationKind::MachO { value, relative: _ } => match value {
|
||||
macho::ARM64_RELOC_SUBTRACTOR => {
|
||||
if let Some(_) = subtractor {
|
||||
if subtractor.is_some() {
|
||||
internal_error!("Malformed object: SUBTRACTOR must not be followed by SUBTRACTOR");
|
||||
} else {
|
||||
subtractor = Some(index);
|
||||
|
@ -1643,8 +1642,7 @@ fn get_target_offset(
|
|||
} else {
|
||||
app_obj
|
||||
.symbol_by_index(index)
|
||||
.and_then(|sym| sym.name())
|
||||
.and_then(|name| Ok(name.trim_start_matches('_')))
|
||||
.and_then(|sym| sym.name().map(|name| name.trim_start_matches('_')))
|
||||
.ok()
|
||||
.and_then(|name| {
|
||||
md.roc_symbol_vaddresses.get(name).map(|address| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue