refactor: swap out some code for existing macros

This commit is contained in:
Jake Stanger
2023-01-28 16:27:01 +00:00
parent ad97550583
commit 012762e102
5 changed files with 41 additions and 54 deletions

View File

@@ -1,6 +1,5 @@
use super::{Workspace, WorkspaceClient, WorkspaceUpdate};
use crate::await_sync;
use crate::error::ERR_CHANNEL_SEND;
use crate::{await_sync, send};
use async_once::AsyncOnce;
use color_eyre::Report;
use futures_util::StreamExt;
@@ -75,7 +74,7 @@ impl WorkspaceClient for SwayEventClient {
let event =
WorkspaceUpdate::Init(workspaces.into_iter().map(Workspace::from).collect());
tx.send(event).expect(ERR_CHANNEL_SEND);
send!(tx, event);
});
}