loader: remove unneeded muts

Rust 1.71.0 reports more cases of unneeded mutability. Remove these from
the loader.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2023-07-16 15:30:23 +08:00
parent e7cb72c478
commit b23f6717ef
2 changed files with 2 additions and 2 deletions

View file

@ -328,7 +328,7 @@ impl MiniElf {
current_page_addr = previous_addr & !(PAGE_SIZE - 1);
}
let mut process = &mut allocator.processes[pid as usize - 1];
let process = &mut allocator.processes[pid as usize - 1];
process.entrypoint = self.entry_point as usize;
process.sp = stack_addr;
#[cfg(not(feature = "atsama5d27"))]

View file

@ -321,7 +321,7 @@ impl ProgramDescription {
allocator.change_owner(pid as XousPid, 0xF000_2000);
}
let mut process = &mut allocator.processes[pid_idx];
let process = &mut allocator.processes[pid_idx];
process.entrypoint = self.entrypoint as usize;
process.sp = stack_addr;
process.satp = 0x8000_0000 | ((pid as usize) << 22) | (satp_address >> 12);