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<dyn Gpu> variant.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jasonwitty
2026-08-21 11:19:04 -07:00
parent 2a7951cf65
commit d8cceb1795
+2 -2
View File
@@ -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<nvml_wrapper::Nvml>),
}
fn probe() -> Option<Handle> {
@@ -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<Vec<GpuMetrics>> {