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)
This commit is contained in:
1 parent
8837ed9aa0
commit
75f7145da0
1 file changed
+1
-1
@@ -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));
|
||||
|
||||
Reference in new issue
Block a user