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.
This commit is contained in:
Anees Iqbal committed 2026-11-19 06:06:57 -08:00
1 parent d75eab9c2b
commit b8ea291aa5
1 file changed
+1 -2
@@ -1731,9 +1731,8 @@ impl<'b, B: Backend> Player<'b, B> {
return Ok(());
};
let dir = dump.dir.clone();
let completed: Vec<u64> = 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)));