Skip to content

Commit

Permalink
style: work around the borrow_deref_ref warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Changyuan Lyu <[email protected]>
  • Loading branch information
Lencerf committed May 31, 2024
1 parent 80283c2 commit 158ea3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions alioth/src/device/fw_cfg/fw_cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ impl<'a> Read for FwCfgContentAccess<'a> {
fn read(&mut self, buf: &mut [u8]) -> Result<usize> {
match self.content {
FwCfgContent::File(offset, f) => {
(&*f).seek(SeekFrom::Start(offset + self.offset as u64))?;
(&*f).read(buf)
Seek::seek(&mut (&*f), SeekFrom::Start(offset + self.offset as u64))?;
Read::read(&mut (&*f), buf)
}
FwCfgContent::Bytes(b) => match b.get(self.offset..) {
Some(mut s) => s.read(buf),
Expand Down

0 comments on commit 158ea3c

Please sign in to comment.