Skip to content

Commit

Permalink
fix: Use proper imports
Browse files Browse the repository at this point in the history
  • Loading branch information
DashieTM committed Nov 10, 2023
1 parent 988cc6f commit b670090
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/bluetooth/bluetooth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use dbus::{
};
use ReSet_Lib::bluetooth::{
bluetooth::BluetoothDevice,
bluetooth_signals::{InterfaceRemovedSignal, InterfacesAddedSignal},
bluetooth_signals::{BluetoothDeviceAdded, BluetoothDeviceRemoved},
};

use crate::utils::{call_system_dbus_method, set_system_dbus_property};
Expand Down Expand Up @@ -159,10 +159,10 @@ impl BluetoothInterface {
let path = self.current_adapter.path.clone();
let conn = Connection::new_system().unwrap();
let proxy = conn.with_proxy("org.bluez", path, Duration::from_millis(1000));
let mr = InterfacesAddedSignal::match_rule(Some(&"org.bluez".into()), None).static_clone();
let mr = BluetoothDeviceAdded::match_rule(Some(&"org.bluez".into()), None).static_clone();
let mrb =
InterfaceRemovedSignal::match_rule(Some(&"org.bluez".into()), None).static_clone();
let res = conn.add_match(mr, move |ir: InterfacesAddedSignal, _, _| {
BluetoothDeviceRemoved::match_rule(Some(&"org.bluez".into()), None).static_clone();
let res = conn.add_match(mr, move |ir: BluetoothDeviceAdded, _, _| {
let device = convert_device(&ir.object, &ir.interfaces);
if device.is_some() {
let device = device.unwrap();
Expand All @@ -183,7 +183,7 @@ impl BluetoothInterface {
"Failed to match signal on bluez.",
));
}
let res = conn.add_match(mrb, move |ir: InterfaceRemovedSignal, _, _| {
let res = conn.add_match(mrb, move |ir: BluetoothDeviceRemoved, _, _| {
let conn = Connection::new_session().unwrap();
let proxy = conn.with_proxy(
"org.xetibo.ReSet",
Expand Down

0 comments on commit b670090

Please sign in to comment.