Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
joonazan committed Aug 23, 2024
1 parent ecda98d commit 37e86e0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/heap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ impl Heap {
/// Needed only by tracers
pub(crate) fn read_byte(&self, address: u32) -> u8 {
let (page, offset) = address_to_page_offset(address);
self.page(page as usize)
.map(|page| page.0[offset as usize])
.unwrap_or(0)
self.page(page).map(|page| page.0[offset]).unwrap_or(0)
}

fn page(&self, idx: usize) -> Option<&HeapPage> {
Expand Down

0 comments on commit 37e86e0

Please sign in to comment.