From 46cb7f4daa6d6dc47d76a0b6e01e8ff2e244adda Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Mon, 9 Nov 2026 08:12:53 -0800 Subject: [PATCH] :art: Name the asked buffer's ticket as held for its drop alone An asked buffer's state held its ticket in a tuple field that nothing reads: the ticket is kept only so that its drop gives it back to the commit order when the buffer's commit, or its end uncommitted, leaves the state. Clippy on macOS rejected the field as never read. The field is now named `_ticket`, and its comment says why it is held. Nothing the guest or the host observes changes. --- crates/reims-vgpu/src/graphics/decode/cmdbuf.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/crates/reims-vgpu/src/graphics/decode/cmdbuf.rs b/crates/reims-vgpu/src/graphics/decode/cmdbuf.rs index 90cdd2ba5..6d1ca77b0 100644 --- a/crates/reims-vgpu/src/graphics/decode/cmdbuf.rs +++ b/crates/reims-vgpu/src/graphics/decode/cmdbuf.rs @@ -515,8 +515,10 @@ pub(crate) struct Askable { enum Asking { /// Begun and not yet committed, its record unposted. Begun(Arc), - /// Asked before its commit: its record posted, its ticket out until its commit. - Asked(Option), + /// Asked before its commit: its record posted, its ticket out until its commit. Nothing reads + /// the ticket: it is held for its drop, which gives it back to the commit order where + /// [`Askable::end`] leaves this state, at the buffer's commit or as it ends uncommitted. + Asked { _ticket: Option }, /// Committed before an ask: an ask posts its record at once, with no ticket, as its commit /// already has its place. Committed(Arc), @@ -529,7 +531,7 @@ impl Askable { /// Whether an ask may still post its record, or it holds its ticket. fn open(&self) -> bool { match &*self.state.lock() { - Asking::Begun(_) | Asking::Asked(_) => true, + Asking::Begun(_) | Asking::Asked { .. } => true, Asking::Committed(scheduled) => !scheduled.is_posted(), Asking::Ended => false, } @@ -543,7 +545,9 @@ impl Askable { let mut state = self.state.lock(); match std::mem::replace(&mut *state, Asking::Ended) { Asking::Begun(scheduled) => { - *state = Asking::Asked(sequencer.issue(self.context, false)); + *state = Asking::Asked { + _ticket: sequencer.issue(self.context, false), + }; scheduled } Asking::Committed(scheduled) => scheduled,