Skip to content

Commit

Permalink
src/pe: rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
RaitoBezarius committed Oct 1, 2023
1 parent a5960be commit aace8e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/pe/optional_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl From<StandardFields> for StandardFields32 {
size_of_uninitialized_data: fields.size_of_uninitialized_data as u32,
address_of_entry_point: fields.address_of_entry_point as u32,
base_of_code: fields.base_of_code as u32,
base_of_data: fields.base_of_data
base_of_data: fields.base_of_data,
}
}
}
Expand Down Expand Up @@ -113,7 +113,7 @@ impl From<StandardFields> for StandardFields64 {
size_of_initialized_data: fields.size_of_initialized_data as u32,
size_of_uninitialized_data: fields.size_of_uninitialized_data as u32,
address_of_entry_point: fields.address_of_entry_point as u32,
base_of_code: fields.base_of_code as u32
base_of_code: fields.base_of_code as u32,
}
}
}
Expand Down Expand Up @@ -366,7 +366,7 @@ impl ctx::TryIntoCtx<scroll::Endian> for OptionalHeader {
bytes.gwrite_with(self.windows_fields, offset, ctx)?;
bytes.gwrite_with(self.data_directories, offset, ctx)?;
}
_ => panic!()
_ => panic!(),
}
Ok(*offset)
}
Expand Down
3 changes: 1 addition & 2 deletions src/pe/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,7 @@ impl<'a> ctx::TryIntoCtx<scroll::Endian> for SymbolTable<'a> {
type Error = error::Error;

fn try_into_ctx(self, bytes: &mut [u8], _ctx: scroll::Endian) -> Result<usize, Self::Error> {
bytes.pwrite(self.symbols, 0)
.map_err(|err| err.into())
bytes.pwrite(self.symbols, 0).map_err(|err| err.into())
}
}

Expand Down

0 comments on commit aace8e5

Please sign in to comment.