Skip to content

Commit f677b7b

Browse files
committed
fix(agents): compile the test-only lock check only with the Unix tests
AgentLocks::is_held is used only by client_tests, which compile on Unix alone, so on Windows the test build reported it as dead code and failed under -D warnings. Signed-off-by: Tee8z <[email protected]>
1 parent 7b6744a commit f677b7b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎crates/buzz-remote-sessions/src/client.rs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@ impl AgentLocks {
9191
Ok(lock.lock_owned().await)
9292
}
9393

94-
/// Whether an operation holds `agent_pubkey`'s lock.
95-
#[cfg(test)]
94+
/// Whether an operation holds `agent_pubkey`'s lock. Only the Unix
95+
/// tests use it, so it is compiled with them.
96+
#[cfg(all(test, unix))]
9697
pub(crate) fn is_held(&self, agent_pubkey: &str) -> bool {
9798
self.0
9899
.lock()

0 commit comments

Comments
 (0)