Reduce the need for Send + Sync bounds on generics
This commit is contained in:
parent
4d621f355d
commit
0910760b76
17 changed files with 405 additions and 362 deletions
|
@ -21,7 +21,7 @@ struct SubscriberSetState<EmitterKey, Callback> {
|
|||
|
||||
impl<EmitterKey, Callback> SubscriberSet<EmitterKey, Callback>
|
||||
where
|
||||
EmitterKey: 'static + Send + Sync + Ord + Clone + Debug,
|
||||
EmitterKey: 'static + Ord + Clone + Debug,
|
||||
Callback: 'static + Send + Sync,
|
||||
{
|
||||
pub fn new() -> Self {
|
||||
|
@ -96,7 +96,7 @@ where
|
|||
|
||||
#[must_use]
|
||||
pub struct Subscription {
|
||||
unsubscribe: Option<Box<dyn FnOnce() + Send + Sync>>,
|
||||
unsubscribe: Option<Box<dyn FnOnce()>>,
|
||||
}
|
||||
|
||||
impl Subscription {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue