Skip to content

Commit

Permalink
Run cargo fix to remove unused muts
Browse files Browse the repository at this point in the history
Cargo build suggests 'cargo fix --lib -p customasm' to remove
unused `mut` qualifiers in iter.rs. This change runs that command
and commits the result. It's passing all tests and builds.
  • Loading branch information
thenorili authored and hlorenzi committed Dec 2, 2023
1 parent 3913be5 commit 8072512
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/asm/resolver/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl<'ast, 'decls> ResolveIterator<'ast, 'decls>
{
if decl.depth == 0
{
let mut cur_bank_data = &mut self.bank_data[self.bank_ref.0];
let cur_bank_data = &mut self.bank_data[self.bank_ref.0];

cur_bank_data.cur_position += bits_until_alignment(
cur_bank_data.cur_position,
Expand Down Expand Up @@ -304,7 +304,7 @@ impl<'ast, 'decls> ResolveIterator<'ast, 'decls>
let item_ref = ast_instr.item_ref.unwrap();
let instr = defs.instructions.get(item_ref);

let mut cur_bank_data = &mut self.bank_data[self.bank_ref.0];
let cur_bank_data = &mut self.bank_data[self.bank_ref.0];

// Advance the current bank's position
cur_bank_data.cur_position += {
Expand All @@ -321,7 +321,7 @@ impl<'ast, 'decls> ResolveIterator<'ast, 'decls>
let item_ref = ast_data.item_refs[self.subindex_prev.unwrap()];
let data_elem = defs.data_elems.get(item_ref);

let mut cur_bank_data = &mut self.bank_data[self.bank_ref.0];
let cur_bank_data = &mut self.bank_data[self.bank_ref.0];

// Advance the current bank's position
cur_bank_data.cur_position += {
Expand All @@ -338,7 +338,7 @@ impl<'ast, 'decls> ResolveIterator<'ast, 'decls>
let item_ref = ast_res.item_ref.unwrap();
let res = defs.res_directives.get(item_ref);

let mut cur_bank_data = &mut self.bank_data[self.bank_ref.0];
let cur_bank_data = &mut self.bank_data[self.bank_ref.0];

// Advance the current bank's position
cur_bank_data.cur_position += res.reserve_size;
Expand All @@ -349,7 +349,7 @@ impl<'ast, 'decls> ResolveIterator<'ast, 'decls>
let item_ref = ast_align.item_ref.unwrap();
let align = defs.align_directives.get(item_ref);

let mut cur_bank_data = &mut self.bank_data[self.bank_ref.0];
let cur_bank_data = &mut self.bank_data[self.bank_ref.0];

cur_bank_data.cur_position += bits_until_alignment(
cur_bank_data.cur_position,
Expand All @@ -362,7 +362,7 @@ impl<'ast, 'decls> ResolveIterator<'ast, 'decls>
let addr = defs.addr_directives.get(item_ref);

let bank = defs.bankdefs.get(self.bank_ref);
let mut cur_bank_data = &mut self.bank_data[self.bank_ref.0];
let cur_bank_data = &mut self.bank_data[self.bank_ref.0];

let new_position = {
if addr.address >= bank.addr_start
Expand Down

0 comments on commit 8072512

Please sign in to comment.