From 82ef730d1d2c9ca50b7439742812c40e681b88f7 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Sat, 14 Nov 2026 02:05:08 -0800 Subject: [PATCH] reencode: take the split units whole, as clippy asks clippy's drain_collect: draining all of split_units into a new Vec of the same type; std::mem::take moves them without a new allocation. --- crates/metal2vulkan-runtime/src/command_buffer/reencode.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/metal2vulkan-runtime/src/command_buffer/reencode.rs b/crates/metal2vulkan-runtime/src/command_buffer/reencode.rs index 8560f8e95..5d1080940 100644 --- a/crates/metal2vulkan-runtime/src/command_buffer/reencode.rs +++ b/crates/metal2vulkan-runtime/src/command_buffer/reencode.rs @@ -140,7 +140,7 @@ impl CommandBufferShared { let open: BTreeSet = (state.recorded[state.unjudged_parts()..].iter()) .map(|part| part.encoder) .collect(); - let split: Vec> = state.split_units.drain(..).collect(); + let split = std::mem::take(&mut state.split_units); let splitting: BTreeSet = split.iter().flatten().copied().collect(); let mut units = Vec::new(); for unit in split {