1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-10-06 04:31:55 +02:00

refactor: replace channel macros with ext trait methods

This commit is contained in:
Jake Stanger 2025-05-18 15:17:09 +01:00
commit f929aef2d9
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
50 changed files with 658 additions and 476 deletions

View file

@ -1,4 +1,5 @@
use crate::{Ironbar, arc_rw, read_lock, send, spawn, write_lock};
use crate::channels::SyncSenderExt;
use crate::{Ironbar, arc_rw, read_lock, spawn, write_lock};
use color_eyre::{Report, Result};
use colpetto::event::{AsRawEvent, DeviceEvent, KeyState, KeyboardEvent};
use colpetto::{DeviceCapability, Libinput};
@ -179,7 +180,7 @@ impl Client {
device_path.display()
);
write_lock!(self.known_devices).push(device_path.to_path_buf());
send!(self.tx, Event::Device);
self.tx.send_expect(Event::Device);
}
}
}
@ -208,7 +209,7 @@ impl Client {
let data = KeyData { device_path, key };
if let Ok(event) = data.try_into() {
send!(tx, event);
tx.send_expect(event);
}
});
}