From d71d1e199382379036dc4760e4edbd5e637e07c3 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Mon, 17 Jul 2023 10:48:57 -0400 Subject: [PATCH] aya: remove dead code This logic moved in bb595c4e69ff0c72c8327e7f64d43ca7a4bc16a3. The mutation here prevented the compiler from noticing. --- aya-obj/src/obj.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/aya-obj/src/obj.rs b/aya-obj/src/obj.rs index 3c5ff126..5ac7d3db 100644 --- a/aya-obj/src/obj.rs +++ b/aya-obj/src/obj.rs @@ -889,17 +889,6 @@ impl Object { } fn parse_section(&mut self, section: Section) -> Result<(), ParseError> { - let mut parts = section.name.rsplitn(2, '/').collect::>(); - parts.reverse(); - - if parts.len() == 1 - && (parts[0] == "xdp" - || parts[0] == "sk_msg" - || parts[0] == "sockops" - || parts[0] == "classifier") - { - parts.push(parts[0]); - } self.section_infos .insert(section.name.to_owned(), (section.index, section.size)); match section.kind {