diff options
author | eri <eri@inventati.org> | 2024-03-08 00:32:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-07 23:32:35 +0000 |
commit | 3b19189896dfa82ce90ac37654bbb585d7ff7efa (patch) | |
tree | cecbdf6754778af3a6c2b7f0db727e4f22219c72 /components/bluetooth/adapter.rs | |
parent | 64d013d473105da64ad7671419e805ac0550fc98 (diff) | |
download | servo-3b19189896dfa82ce90ac37654bbb585d7ff7efa.tar.gz servo-3b19189896dfa82ce90ac37654bbb585d7ff7efa.zip |
clippy: fix warnings in components/bluetooth (#31566)
Diffstat (limited to 'components/bluetooth/adapter.rs')
-rw-r--r-- | components/bluetooth/adapter.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/components/bluetooth/adapter.rs b/components/bluetooth/adapter.rs index e252e2434a6..44a763c9442 100644 --- a/components/bluetooth/adapter.rs +++ b/components/bluetooth/adapter.rs @@ -197,6 +197,7 @@ impl BluetoothAdapter { pub fn create_discovery_session(&self) -> Result<BluetoothDiscoverySession, Box<dyn Error>> { let discovery_session = match self { #[cfg(all(target_os = "linux", feature = "native-bluetooth"))] + #[allow(clippy::arc_with_non_send_sync)] // Problem with underlying library BluetoothAdapter::Bluez(inner) => BluetoothDiscoverySession::Bluez(Arc::new( BluetoothDiscoverySessionBluez::create_session(inner.get_id())?, )), @@ -292,7 +293,10 @@ impl BluetoothAdapter { pub fn set_id(&self, id: String) -> Result<(), Box<dyn Error>> { match self { #[cfg(feature = "bluetooth-test")] - BluetoothAdapter::Mock(inner) => Ok(inner.set_id(id)), + BluetoothAdapter::Mock(inner) => { + inner.set_id(id); + Ok(()) + }, _ => Err(Box::from( "Error! Test functions are not supported on real devices!", )), |