Skip to content

Commit

Permalink
Make ElfResolver::parser() private
Browse files Browse the repository at this point in the history
As it turns out the ElfResolver::parser() method, by now, is used only
in the elf/resolver.rs module itself. Make sure that it stays that way
by making it private.

Signed-off-by: Daniel Müller <[email protected]>
  • Loading branch information
d-e-s-o committed May 6, 2024
1 parent 5d2b025 commit b372a69
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/elf/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl ElfResolver {
Ok(resolver)
}

pub(crate) fn parser(&self) -> &Rc<ElfParser> {
fn parser(&self) -> &Rc<ElfParser> {
match &self.backend {
#[cfg(feature = "dwarf")]
ElfBackend::Dwarf(dwarf) => dwarf.parser(),
Expand All @@ -145,11 +145,7 @@ impl ElfResolver {

/// Retrieve the path to the ELF file represented by this resolver.
pub(crate) fn path(&self) -> Option<&Path> {
match &self.backend {
#[cfg(feature = "dwarf")]
ElfBackend::Dwarf(dwarf) => dwarf.parser().path(),
ElfBackend::Elf(parser) => parser.path(),
}
self.parser().path()
}
}

Expand Down

0 comments on commit b372a69

Please sign in to comment.