From b8ea291aa539f71adbfd93f1af3a6be73e67f1e7 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Thu, 19 Nov 2026 05:51:43 -0800 Subject: [PATCH] validation: the dump writer takes completed command buffers off its list one by one Clippy's drain_collect refused the drain into a new Vec of the same type (check m3-max-51969). The ids now come off the list with pop; the order does not matter, since each buffer is written to its own files. Verified by the check named when this lands. --- crates/metal2vulkan-validation/src/replay/player.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/metal2vulkan-validation/src/replay/player.rs b/crates/metal2vulkan-validation/src/replay/player.rs index 245b0b8c7..d13b68637 100644 --- a/crates/metal2vulkan-validation/src/replay/player.rs +++ b/crates/metal2vulkan-validation/src/replay/player.rs @@ -1731,9 +1731,8 @@ impl<'b, B: Backend> Player<'b, B> { return Ok(()); }; let dir = dump.dir.clone(); - let completed: Vec = dump.completed.drain(..).collect(); let mut buffers = Vec::new(); - for command_buffer in completed { + while let Some(command_buffer) = dump.completed.pop() { dump.encoders.retain(|_, of| *of != command_buffer); let named = dump.named.remove(&command_buffer).unwrap_or_default(); buffers.extend(named.into_iter().map(|object| (command_buffer, object)));