Skip to content

Commit

Permalink
style: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Mufanc committed Jan 1, 2024
1 parent 746d4be commit 4924b10
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/dex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl<'a> MemoryDex<'a> {
pub fn new(memory: &'a RemoteMemory, map: &'a MemoryMap) -> anyhow::Result<Self> {
let mut buffer = [0; Header::SIZE];

memory.read_memory(&map, &mut buffer)?;
memory.read_memory(map, &mut buffer)?;

Ok(Self {
memory, map,
Expand Down Expand Up @@ -88,17 +88,17 @@ impl<'a> MemoryDex<'a> {
return false;
}

return true
true
}

pub fn size(&self) -> usize {
return self.header.file_size as usize
self.header.file_size as usize
}

pub fn dump(&self, output_file: &PathBuf) -> anyhow::Result<()> {
let mut buffer = vec![0; self.size()];

self.memory.read_memory(&self.map, &mut buffer[..])?;
self.memory.read_memory(self.map, &mut buffer[..])?;
fs::write(output_file, buffer)?;

Ok(())
Expand Down

0 comments on commit 4924b10

Please sign in to comment.