From 78004710c2a022cd317a75e85567940b74511e06 Mon Sep 17 00:00:00 2001 From: Jose Luis Rivas Date: Wed, 7 Oct 2026 16:07:47 +0200 Subject: [PATCH] lib: use `Capabilities` type inside `PMT` Crash Log source This patch updates the PMT source logic to use the `Capabilities` type Signed-off-by: Jose Luis Rivas --- lib/src/source/pmt.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/src/source/pmt.rs b/lib/src/source/pmt.rs index d083132..54d9e69 100644 --- a/lib/src/source/pmt.rs +++ b/lib/src/source/pmt.rs @@ -5,15 +5,13 @@ mod bdf; #[cfg(all(target_os = "linux", feature = "std"))] mod sysfs; -use super::capability::Capability; use crate::CrashLog; use crate::error::Error; +use crate::source::Capabilities; #[cfg(not(feature = "std"))] -use alloc::{ - collections::BTreeSet, fmt, format, str::FromStr, string::String, string::ToString, vec::Vec, -}; +use alloc::{fmt, format, str::FromStr, string::String, string::ToString, vec::Vec}; #[cfg(feature = "std")] -use std::{collections::BTreeSet, fmt, str::FromStr}; +use std::{fmt, str::FromStr}; #[cfg(all(target_os = "linux", feature = "std"))] use sysfs::PmtSysFs; #[cfg(all(target_os = "linux", feature = "control_commands"))] @@ -78,13 +76,13 @@ impl Pmt { } #[cfg(target_os = "linux")] - pub fn capabilities(&self, dev: &PmtDeviceId) -> BTreeSet { + pub fn capabilities(&self, dev: &PmtDeviceId) -> Capabilities { self.sysfs.capabilities(dev) } #[cfg(not(target_os = "linux"))] - pub fn capabilities(&self, _dev: &PmtDeviceId) -> BTreeSet { - BTreeSet::default() + pub fn capabilities(&self, _dev: &PmtDeviceId) -> Capabilities { + Capabilities::new() } #[cfg(all(target_os = "linux", feature = "control_commands"))]