This commit is contained in:
Antonio Scandurra 2023-10-23 11:53:24 +02:00
parent 0de4a93ec7
commit c0e8ae5dfa
4 changed files with 47 additions and 52 deletions

View file

@ -21,8 +21,8 @@ struct SubscriberSetState<EmitterKey, Callback> {
impl<EmitterKey, Callback> SubscriberSet<EmitterKey, Callback>
where
EmitterKey: 'static + Ord + Clone + Debug,
Callback: 'static,
EmitterKey: 'static + Send + Sync + Ord + Clone + Debug,
Callback: 'static + Send + Sync,
{
pub fn new() -> Self {
Self(Arc::new(Mutex::new(SubscriberSetState {
@ -96,7 +96,7 @@ where
#[must_use]
pub struct Subscription {
unsubscribe: Option<Box<dyn FnOnce()>>,
unsubscribe: Option<Box<dyn FnOnce() + Send + Sync>>,
}
impl Subscription {