summaryrefslogtreecommitdiffstats
path: root/vendor/object/src/read/pe
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
commit9835e2ae736235810b4ea1c162ca5e65c547e770 (patch)
tree3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/object/src/read/pe
parentReleasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff)
downloadrustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz
rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/object/src/read/pe')
-rw-r--r--vendor/object/src/read/pe/data_directory.rs2
-rw-r--r--vendor/object/src/read/pe/file.rs4
-rw-r--r--vendor/object/src/read/pe/resource.rs2
-rw-r--r--vendor/object/src/read/pe/rich.rs2
-rw-r--r--vendor/object/src/read/pe/section.rs2
5 files changed, 5 insertions, 7 deletions
diff --git a/vendor/object/src/read/pe/data_directory.rs b/vendor/object/src/read/pe/data_directory.rs
index f5d98774e..0e10244bf 100644
--- a/vendor/object/src/read/pe/data_directory.rs
+++ b/vendor/object/src/read/pe/data_directory.rs
@@ -178,7 +178,7 @@ impl pe::ImageDataDirectory {
/// 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`.
- pub fn file_range<'data>(&self, sections: &SectionTable<'data>) -> Result<(u32, u32)> {
+ pub fn file_range(&self, sections: &SectionTable<'_>) -> Result<(u32, u32)> {
let (offset, section_size) = sections
.pe_file_range_at(self.virtual_address.get(LE))
.read_error("Invalid data dir virtual address")?;
diff --git a/vendor/object/src/read/pe/file.rs b/vendor/object/src/read/pe/file.rs
index 8dd85131a..0f8ce9f25 100644
--- a/vendor/object/src/read/pe/file.rs
+++ b/vendor/object/src/read/pe/file.rs
@@ -80,7 +80,7 @@ where
}
/// Returns information about the rich header of this file (if any).
- pub fn rich_header_info(&self) -> Option<RichHeaderInfo> {
+ pub fn rich_header_info(&self) -> Option<RichHeaderInfo<'_>> {
RichHeaderInfo::parse(self.data, self.dos_header.nt_headers_offset().into())
}
@@ -298,7 +298,7 @@ where
Ok(exports)
}
- fn pdb_info(&self) -> Result<Option<CodeView>> {
+ fn pdb_info(&self) -> Result<Option<CodeView<'_>>> {
let data_dir = match self.data_directory(pe::IMAGE_DIRECTORY_ENTRY_DEBUG) {
Some(data_dir) => data_dir,
None => return Ok(None),
diff --git a/vendor/object/src/read/pe/resource.rs b/vendor/object/src/read/pe/resource.rs
index e667f0d98..646eaefaa 100644
--- a/vendor/object/src/read/pe/resource.rs
+++ b/vendor/object/src/read/pe/resource.rs
@@ -143,7 +143,7 @@ pub struct ResourceName {
impl ResourceName {
/// Converts to a `String`.
- pub fn to_string_lossy(&self, directory: ResourceDirectory) -> Result<String> {
+ pub fn to_string_lossy(&self, directory: ResourceDirectory<'_>) -> Result<String> {
let d = self.data(directory)?.iter().map(|c| c.get(LE));
Ok(char::decode_utf16(d)
diff --git a/vendor/object/src/read/pe/rich.rs b/vendor/object/src/read/pe/rich.rs
index 687dfc995..33dd039c9 100644
--- a/vendor/object/src/read/pe/rich.rs
+++ b/vendor/object/src/read/pe/rich.rs
@@ -77,7 +77,7 @@ impl<'data> RichHeaderInfo<'data> {
}
}
-/// Find the offset of the first occurence of needle in the data.
+/// Find the offset of the first occurrence of needle in the data.
///
/// The offset must have the given alignment.
fn memmem(data: &[u8], needle: &[u8], align: usize) -> Option<usize> {
diff --git a/vendor/object/src/read/pe/section.rs b/vendor/object/src/read/pe/section.rs
index 439d42dac..2880e401f 100644
--- a/vendor/object/src/read/pe/section.rs
+++ b/vendor/object/src/read/pe/section.rs
@@ -143,7 +143,6 @@ pub type PeSectionIterator64<'data, 'file, R = &'data [u8]> =
#[derive(Debug)]
pub struct PeSectionIterator<'data, 'file, Pe, R = &'data [u8]>
where
- 'data: 'file,
Pe: ImageNtHeaders,
R: ReadRef<'data>,
{
@@ -178,7 +177,6 @@ pub type PeSection64<'data, 'file, R = &'data [u8]> =
#[derive(Debug)]
pub struct PeSection<'data, 'file, Pe, R = &'data [u8]>
where
- 'data: 'file,
Pe: ImageNtHeaders,
R: ReadRef<'data>,
{