From d8cceb1795e82e98ec78c8a92ed63263bb741b10 Mon Sep 17 00:00:00 2001 From: jasonwitty Date: Fri, 21 Aug 2026 11:19:04 -0700 Subject: [PATCH] fix(agent): box the NVML handle variant (clippy large_enum_variant) CI clippy runs with -D warnings; Nvml is a large struct next to the 16-byte Box variant. Co-Authored-By: Claude Fable 5 --- socktop_agent/src/gpu.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/socktop_agent/src/gpu.rs b/socktop_agent/src/gpu.rs index d32596c..861b2e8 100644 --- a/socktop_agent/src/gpu.rs +++ b/socktop_agent/src/gpu.rs @@ -58,7 +58,7 @@ mod worker { /// ship only libnvidia-ml.so.1 (the unversioned symlink lives in the /// dev package), so gfxinfo's default dlopen fails there even though /// the driver is fully functional. - Nvml(nvml_wrapper::Nvml), + Nvml(Box), } fn probe() -> Option { @@ -69,7 +69,7 @@ mod worker { .lib_path(std::ffi::OsStr::new("libnvidia-ml.so.1")) .init() .ok() - .map(Handle::Nvml) + .map(|nvml| Handle::Nvml(Box::new(nvml))) } fn collect_from(handle: &Handle) -> Option> {