From 611772af45f8b2e43655f03a66b8950966fa1982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=C3=A1n=20de=20B=C3=BArca?= Date: Thu, 3 Apr 2025 14:50:30 -0700 Subject: [PATCH] rusticl: replace unnecessary `Vec` references with slice refs v2: restore static borrow on `core::device::devs()` Reviewed-by: @LingMan Reviewed-by: Karol Herbst Part-of: --- src/gallium/frontends/rusticl/core/device.rs | 2 +- src/gallium/frontends/rusticl/core/program.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/frontends/rusticl/core/device.rs b/src/gallium/frontends/rusticl/core/device.rs index ceedb901719..814a2d206a2 100644 --- a/src/gallium/frontends/rusticl/core/device.rs +++ b/src/gallium/frontends/rusticl/core/device.rs @@ -1180,7 +1180,7 @@ impl Device { } } -pub fn devs() -> &'static Vec { +pub fn devs() -> &'static [Device] { &Platform::get().devs } diff --git a/src/gallium/frontends/rusticl/core/program.rs b/src/gallium/frontends/rusticl/core/program.rs index 930d7fe03b5..3a223c04b06 100644 --- a/src/gallium/frontends/rusticl/core/program.rs +++ b/src/gallium/frontends/rusticl/core/program.rs @@ -560,7 +560,7 @@ impl Program { let mut res = true; for dev in devs { - if !self.do_compile(dev, options, &Vec::new(), &mut info) { + if !self.do_compile(dev, options, &[], &mut info) { res = false; continue; }