1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-07-02 03:01:04 +02:00

refactor: macros to reduce repeated code

This commit is contained in:
Jake Stanger 2022-12-11 22:45:52 +00:00
parent 9d5049dde0
commit 5e21cbcca6
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
18 changed files with 225 additions and 248 deletions

View file

@ -1,4 +1,4 @@
use crate::error;
use crate::send;
use tokio::spawn;
use tokio::sync::mpsc;
@ -22,7 +22,7 @@ impl<T: Send + 'static> BridgeChannel<T> {
spawn(async move {
while let Some(val) = async_rx.recv().await {
sync_tx.send(val).expect(error::ERR_CHANNEL_SEND);
send!(sync_tx, val);
}
});