From 199eeb43cb2119cb0fb3d99e1fb4275bb1a985ba Mon Sep 17 00:00:00 2001 From: DeFiDude <59237470+DeFiDude@users.noreply.github.com> Date: Fri, 21 Aug 2026 03:20:46 -0600 Subject: [PATCH] ci: retain Linux pairing error stages --- crates/rns-interface/src/ble_rnode.rs | 15 +++--- .../rns-interface/src/ble_rnode/generation.rs | 53 +++++++------------ 2 files changed, 27 insertions(+), 41 deletions(-) diff --git a/crates/rns-interface/src/ble_rnode.rs b/crates/rns-interface/src/ble_rnode.rs index e431c62..1fdd51d 100644 --- a/crates/rns-interface/src/ble_rnode.rs +++ b/crates/rns-interface/src/ble_rnode.rs @@ -504,12 +504,15 @@ enum DesktopPairingTrigger { target_os = "android" ))] impl DesktopPairingTrigger { - #[cfg(any( - target_os = "ios", - target_os = "macos", - target_os = "windows", - target_os = "android" - ))] + #[cfg_attr( + not(any( + target_os = "ios", + target_os = "macos", + target_os = "windows", + target_os = "android" + )), + allow(dead_code) + )] const fn label(self) -> &'static str { match self { Self::EncryptedRead => "encrypted_read", diff --git a/crates/rns-interface/src/ble_rnode/generation.rs b/crates/rns-interface/src/ble_rnode/generation.rs index b99387d..b8e7765 100644 --- a/crates/rns-interface/src/ble_rnode/generation.rs +++ b/crates/rns-interface/src/ble_rnode/generation.rs @@ -28,21 +28,25 @@ pub(super) enum BleOperationStage { Connect, ConnectedCheck, Discovery, - #[cfg(any( - test, - target_os = "ios", - target_os = "macos", - target_os = "windows", - target_os = "android" - ))] + #[cfg_attr( + not(any( + target_os = "ios", + target_os = "macos", + target_os = "windows", + target_os = "android" + )), + allow(dead_code) + )] PairingRead, - #[cfg(any( - test, - target_os = "ios", - target_os = "macos", - target_os = "windows", - target_os = "android" - ))] + #[cfg_attr( + not(any( + target_os = "ios", + target_os = "macos", + target_os = "windows", + target_os = "android" + )), + allow(dead_code) + )] PairingSubscribe, Subscribe, NotificationAcquisition, @@ -56,13 +60,6 @@ pub(super) enum BleOperationStage { impl BleOperationStage { pub(super) const fn deadline(self) -> Duration { match self { - #[cfg(any( - test, - target_os = "ios", - target_os = "macos", - target_os = "windows", - target_os = "android" - ))] Self::PairingRead | Self::PairingSubscribe => Duration::from_secs(60), Self::ActiveWrite => Duration::from_secs(5), Self::Disconnect => Duration::from_secs(3), @@ -84,21 +81,7 @@ impl fmt::Display for BleOperationStage { Self::Connect => "connect", Self::ConnectedCheck => "connected check", Self::Discovery => "service discovery", - #[cfg(any( - test, - target_os = "ios", - target_os = "macos", - target_os = "windows", - target_os = "android" - ))] Self::PairingRead => "pairing read", - #[cfg(any( - test, - target_os = "ios", - target_os = "macos", - target_os = "windows", - target_os = "android" - ))] Self::PairingSubscribe => "pairing notification subscribe", Self::Subscribe => "notification subscribe", Self::NotificationAcquisition => "notification acquisition",