From b372a69055812b3df42085d13460aa9501025754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCller?= Date: Mon, 6 May 2024 10:33:16 -0700 Subject: [PATCH] Make ElfResolver::parser() private MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/elf/resolver.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/elf/resolver.rs b/src/elf/resolver.rs index 57860033..5b960766 100644 --- a/src/elf/resolver.rs +++ b/src/elf/resolver.rs @@ -135,7 +135,7 @@ impl ElfResolver { Ok(resolver) } - pub(crate) fn parser(&self) -> &Rc { + fn parser(&self) -> &Rc { match &self.backend { #[cfg(feature = "dwarf")] ElfBackend::Dwarf(dwarf) => dwarf.parser(), @@ -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() } }