Skip to content

Commit aff5da4

Browse files
committed
fmt: Fix formatting
1 parent 3131cc2 commit aff5da4

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/pe/mod.rs

+9-8
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub struct PE<'a> {
5757
pub debug_data: Option<debug::DebugData<'a>>,
5858
/// Exception handling and stack unwind information, if any, contained in the PE header
5959
pub exception_data: Option<exception::ExceptionData<'a>>,
60-
pub section_table: &'a [u8]
60+
pub section_table: &'a [u8],
6161
}
6262

6363
impl<'a> PE<'a> {
@@ -70,15 +70,16 @@ impl<'a> PE<'a> {
7070
+ header::SIZEOF_COFF_HEADER
7171
+ header.coff_header.size_of_optional_header as usize);
7272

73-
let min_size = *offset + header.coff_header.number_of_sections as usize * header::SIZEOF_IMAGE_SECTION_HEADER;
73+
let min_size = *offset
74+
+ header.coff_header.number_of_sections as usize * header::SIZEOF_IMAGE_SECTION_HEADER;
7475

7576
if bytes.len() < min_size {
7677
// The section table contains more entries than the binary can provide given the size
77-
return Err(
78-
error::Error::Malformed(
79-
format!("Corrupted PE: Expected at least {:#X} bytes but got {:#X}", min_size, bytes.len())
80-
)
81-
)
78+
return Err(error::Error::Malformed(format!(
79+
"Corrupted PE: Expected at least {:#X} bytes but got {:#X}",
80+
min_size,
81+
bytes.len()
82+
)));
8283
}
8384

8485
let section_table = &bytes[*offset..min_size];
@@ -189,7 +190,7 @@ impl<'a> PE<'a> {
189190
libraries,
190191
debug_data,
191192
exception_data,
192-
section_table
193+
section_table,
193194
})
194195
}
195196
}

0 commit comments

Comments
 (0)