aboutsummaryrefslogtreecommitdiffstats
path: root/components/bluetooth/adapter.rs
diff options
context:
space:
mode:
authoreri <eri@inventati.org>2024-03-08 00:32:35 +0100
committerGitHub <noreply@github.com>2024-03-07 23:32:35 +0000
commit3b19189896dfa82ce90ac37654bbb585d7ff7efa (patch)
treececbdf6754778af3a6c2b7f0db727e4f22219c72 /components/bluetooth/adapter.rs
parent64d013d473105da64ad7671419e805ac0550fc98 (diff)
downloadservo-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.rs6
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!",
)),