Skip to content

Commit

Permalink
Add explicit lifetime parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaoliello committed Jul 31, 2024
1 parent e2103f2 commit 3a23a32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/archive_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ fn write_symbol_table<W: Write + Seek>(
fn write_symbol_map<W: Write + Seek>(
w: &mut W,
kind: ArchiveKind,
members: &[MemberData],
members: &[MemberData<'_>],
sym_map: &SymMap,
members_offset: u64,
) -> io::Result<()> {
Expand Down
10 changes: 5 additions & 5 deletions src/coff_import_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ impl<'a> ObjectFactory<'a> {
/// reference to the terminators and contains the library name (entry) for the
/// import name table. It will force the linker to construct the necessary
/// structure to import symbols from the DLL.
fn create_import_descriptor(&self) -> Result<NewArchiveMember> {
fn create_import_descriptor(&self) -> Result<NewArchiveMember<'_>> {
let mut buffer = Vec::new();

const NUMBER_OF_SECTIONS: usize = 2;
Expand Down Expand Up @@ -460,7 +460,7 @@ impl<'a> ObjectFactory<'a> {
/// Creates a NULL import descriptor. This is a small object file whcih
/// contains a NULL import descriptor. It is used to terminate the imports
/// from a specific DLL.
fn create_null_import_descriptor(&self) -> Result<NewArchiveMember> {
fn create_null_import_descriptor(&self) -> Result<NewArchiveMember<'_>> {
let mut buffer = Vec::new();

const NUMBER_OF_SECTIONS: usize = 1;
Expand Down Expand Up @@ -542,7 +542,7 @@ impl<'a> ObjectFactory<'a> {
/// Create a NULL Thunk Entry. This is a small object file which contains a
/// NULL Import Address Table entry and a NULL Import Lookup Table Entry. It
/// is used to terminate the IAT and ILT.
fn create_null_thunk(&self) -> Result<NewArchiveMember> {
fn create_null_thunk(&self) -> Result<NewArchiveMember<'_>> {
let mut buffer = Vec::new();

const NUMBER_OF_SECTIONS: usize = 2;
Expand Down Expand Up @@ -658,7 +658,7 @@ impl<'a> ObjectFactory<'a> {
name_type: ImportNameType,
export_name: Option<&str>,
machine: MachineTypes,
) -> Result<NewArchiveMember> {
) -> Result<NewArchiveMember<'_>> {
let mut imp_size = self.import_name.len() + sym.len() + 2; // +2 for NULs
if let Some(export_name) = export_name {
imp_size += export_name.len() + 1;
Expand Down Expand Up @@ -704,7 +704,7 @@ impl<'a> ObjectFactory<'a> {
weak: &str,
imp: bool,
machine: MachineTypes,
) -> Result<NewArchiveMember> {
) -> Result<NewArchiveMember<'_>> {
let mut buffer = Vec::new();
const NUMBER_OF_SECTIONS: usize = 1;
const NUMBER_OF_SYMBOLS: usize = 5;
Expand Down

0 comments on commit 3a23a32

Please sign in to comment.