Make Event trait Send+Sync.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-07-08 11:50:54 +00:00
parent b0315da3d7
commit 8244d78cb2
15 changed files with 27 additions and 25 deletions

View File

@@ -296,8 +296,7 @@ impl Service {
event: &E,
) -> Result
where
E: Event + Send + Sync,
for<'a> &'a E: Event + Send,
E: Event,
{
let mut notify = None;
let mut tweaks = Vec::new();
@@ -385,15 +384,13 @@ impl Service {
}
#[tracing::instrument(skip(self, unread, pusher, tweaks, event))]
async fn send_notice<E>(
async fn send_notice<Pdu: Event>(
&self,
unread: UInt,
pusher: &Pusher,
tweaks: Vec<Tweak>,
event: &E,
event: &Pdu,
) -> Result
where
E: Event + Send + Sync,
{
// TODO: email
match &pusher.kind {