From 6a38e4cd6c3a3ec4d2bdb0c2e567cf320379b9aa Mon Sep 17 00:00:00 2001 From: Thaddeus Ternes Date: Wed, 14 May 2025 15:34:32 -0500 Subject: [PATCH 1/2] Add NSError to trace log --- src/corebluetooth/central_delegate.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/corebluetooth/central_delegate.rs b/src/corebluetooth/central_delegate.rs index 9dacd721..32dec823 100644 --- a/src/corebluetooth/central_delegate.rs +++ b/src/corebluetooth/central_delegate.rs @@ -348,8 +348,9 @@ declare_class!( _error: Option<&NSError>, ) { trace!( - "delegate_centralmanager_diddisconnectperipheral_error {}", - peripheral_debug(peripheral) + "delegate_centralmanager_diddisconnectperipheral_error {} (error={:?})", + peripheral_debug(peripheral), + _error ); let peripheral_uuid = nsuuid_to_uuid(unsafe { &peripheral.identifier() }); self.send_event(CentralDelegateEvent::DisconnectedDevice { peripheral_uuid }); From 9728c1dee214930fd055b0a28d07dedd4b13b2fb Mon Sep 17 00:00:00 2001 From: Thaddeus Ternes Date: Wed, 14 May 2025 15:44:31 -0500 Subject: [PATCH 2/2] Remove underscore prefix --- src/corebluetooth/central_delegate.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corebluetooth/central_delegate.rs b/src/corebluetooth/central_delegate.rs index 32dec823..d7651e10 100644 --- a/src/corebluetooth/central_delegate.rs +++ b/src/corebluetooth/central_delegate.rs @@ -345,12 +345,12 @@ declare_class!( &self, _central: &CBCentralManager, peripheral: &CBPeripheral, - _error: Option<&NSError>, + error: Option<&NSError>, ) { trace!( "delegate_centralmanager_diddisconnectperipheral_error {} (error={:?})", peripheral_debug(peripheral), - _error + error ); let peripheral_uuid = nsuuid_to_uuid(unsafe { &peripheral.identifier() }); self.send_event(CentralDelegateEvent::DisconnectedDevice { peripheral_uuid });