From 03468acd5fd989484896939c918834606bb35d04 Mon Sep 17 00:00:00 2001 From: Kevin Mehall Date: Thu, 29 May 2025 22:22:34 -0600 Subject: [PATCH] linux: Remove BusInfo::parent_path You can just use the Path method --- src/enumeration.rs | 10 ---------- src/platform/linux_usbfs/enumeration.rs | 1 - 2 files changed, 11 deletions(-) diff --git a/src/enumeration.rs b/src/enumeration.rs index 05c9b7f..efc07c6 100644 --- a/src/enumeration.rs +++ b/src/enumeration.rs @@ -479,9 +479,6 @@ pub struct BusInfo { #[cfg(any(target_os = "linux", target_os = "android"))] pub(crate) path: SysfsPath, - #[cfg(any(target_os = "linux", target_os = "android"))] - pub(crate) parent_path: SysfsPath, - /// The phony root hub device #[cfg(any(target_os = "linux", target_os = "android"))] pub(crate) root_hub: DeviceInfo, @@ -535,12 +532,6 @@ impl BusInfo { &self.path.0 } - /// *(Linux-only)* Sysfs path for the parent controller - #[cfg(any(target_os = "linux", target_os = "android"))] - pub fn parent_sysfs_path(&self) -> &std::path::Path { - &self.parent_path.0 - } - /// *(Linux-only)* Bus number. /// /// On Linux, the `bus_id` is an integer and this provides the value as `u8`. @@ -664,7 +655,6 @@ impl std::fmt::Debug for BusInfo { #[cfg(any(target_os = "linux", target_os = "android"))] { s.field("sysfs_path", &self.path); - s.field("parent_sysfs_path", &self.parent_path); s.field("busnum", &self.busnum); } diff --git a/src/platform/linux_usbfs/enumeration.rs b/src/platform/linux_usbfs/enumeration.rs index c291faf..62250e7 100644 --- a/src/platform/linux_usbfs/enumeration.rs +++ b/src/platform/linux_usbfs/enumeration.rs @@ -175,7 +175,6 @@ pub fn list_buses() -> impl MaybeFuture