Skip to content

Commit

Permalink
Fix cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
fractasy committed Nov 23, 2024
1 parent 411ef17 commit 31cb107
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/src/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ impl Mem {
panic!("Mem::add_write_section() got invalid start={}", start);
}

// Check the write section address has not been set before this call, since one only write section is allowed
// Check the write section address has not been set before this call, since one only write
// section is allowed
if self.write_section.start != 0 {
panic!(
"Mem::add_write_section() only one write section allowed, write_section.start={}",
Expand All @@ -79,7 +80,8 @@ impl Mem {
self.write_section.buffer = mem;
}

/// Reads a 1, 2, 4 or 8 bytes value from the memory read sections, based on the provided address and width
/// Reads a 1, 2, 4 or 8 bytes value from the memory read sections, based on the provided
/// address and width
#[inline(always)]
pub fn read(&self, addr: u64, width: u64) -> u64 {
// First try to read from the write section
Expand Down

0 comments on commit 31cb107

Please sign in to comment.