From 75f7145da0949e4a0392508e1e253ee46da7022b Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Sun, 8 Nov 2026 03:59:14 -0800 Subject: [PATCH] exit_guard test: compare the places with a slice of the one place, not a clone clippy's cloned_ref_to_slice_refs (-D warnings) refused the_sections_in_progress_name_where_they_began's [here.clone()], which edee4b4963 (landed as f5da0934bf) added: development's clippy with --all-targets failed on it. std::slice::from_ref(&here) compares the same one-element list. Verified: cargo clippy -p metal2vulkan-runtime --all-targets --all-features -D warnings on homelab-um790 (lavapipe cfg) failed on the line before this change; the run after it is in the report. (cherry picked from commit a9584bbb39ebc545cb7571b8f6caf13da8a24743) --- crates/metal2vulkan-runtime/src/tests/exit_guard.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/metal2vulkan-runtime/src/tests/exit_guard.rs b/crates/metal2vulkan-runtime/src/tests/exit_guard.rs index 6568fe83d..b50187bb0 100644 --- a/crates/metal2vulkan-runtime/src/tests/exit_guard.rs +++ b/crates/metal2vulkan-runtime/src/tests/exit_guard.rs @@ -55,7 +55,7 @@ fn the_sections_in_progress_name_where_they_began() { let (outer, line) = (guard.enter().expect("open"), line!()); let nested = guard.enter().expect("open"); let here = format!("{}:{line}", file!()); - assert_eq!(guard.places_in_progress(), [here.clone()]); + assert_eq!(guard.places_in_progress(), std::slice::from_ref(&here)); let (entered, done) = (Arc::new(Barrier::new(2)), Arc::new(Barrier::new(2))); let worker = { let (entered, done) = (Arc::clone(&entered), Arc::clone(&done));