Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
philipc committed Aug 29, 2024
1 parent 46af874 commit 7c78bf9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1868,6 +1868,7 @@ pub const ELF_NOTE_OS_FREEBSD: u32 = 3;
/// The descriptor begins with two words:
/// - word 0: number of entries
/// - word 1: bitmask of enabled entries
///
/// Then follow variable-length entries, one byte followed by a
/// '\0'-terminated hwcap name string. The byte gives the bit
/// number to test if enabled, (1U << bit) & bitmask. */
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
// Style.
#![allow(clippy::collapsible_else_if)]
#![allow(clippy::collapsible_if)]
#![allow(clippy::collapsible_match)]
#![allow(clippy::comparison_chain)]
#![allow(clippy::field_reassign_with_default)]
#![allow(clippy::manual_flatten)]
Expand Down
4 changes: 2 additions & 2 deletions src/read/archive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ enum SymbolIteratorInternal<'data> {
/// Contains:
/// - the size in bytes of the offsets array as a 32-bit little-endian integer
/// - the offsets array, for which each entry is a pair of 32-bit little-endian integers
/// for the offset of the member header and the offset of the symbol name
/// for the offset of the member header and the offset of the symbol name
/// - the size in bytes of the symbol names as a 32-bit little-endian integer
/// - the symbol names as null-terminated strings
Bsd {
Expand All @@ -642,7 +642,7 @@ enum SymbolIteratorInternal<'data> {
/// Contains:
/// - the size in bytes of the offsets array as a 64-bit little-endian integer
/// - the offsets array, for which each entry is a pair of 64-bit little-endian integers
/// for the offset of the member header and the offset of the symbol name
/// for the offset of the member header and the offset of the symbol name
/// - the size in bytes of the symbol names as a 64-bit little-endian integer
/// - the symbol names as null-terminated strings
Bsd64 {
Expand Down
8 changes: 4 additions & 4 deletions src/read/pe/data_directory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ impl pe::ImageDataDirectory {
/// This function has some limitations:
/// - It requires that the data is contained in a single section.
/// - It uses the size field of the directory entry, which is
/// not desirable for all data directories.
/// not desirable for all data directories.
/// - It uses the `virtual_address` of the directory entry as an address,
/// which is not valid for `IMAGE_DIRECTORY_ENTRY_SECURITY`.
/// which is not valid for `IMAGE_DIRECTORY_ENTRY_SECURITY`.
pub fn file_range(&self, sections: &SectionTable<'_>) -> Result<(u32, u32)> {
let (offset, section_size) = sections
.pe_file_range_at(self.virtual_address.get(LE))
Expand All @@ -197,9 +197,9 @@ impl pe::ImageDataDirectory {
/// This function has some limitations:
/// - It requires that the data is contained in a single section.
/// - It uses the size field of the directory entry, which is
/// not desirable for all data directories.
/// not desirable for all data directories.
/// - It uses the `virtual_address` of the directory entry as an address,
/// which is not valid for `IMAGE_DIRECTORY_ENTRY_SECURITY`.
/// which is not valid for `IMAGE_DIRECTORY_ENTRY_SECURITY`.
pub fn data<'data, R: ReadRef<'data>>(
&self,
data: R,
Expand Down

0 comments on commit 7c78bf9

Please sign in to comment.