Make the OnFlushCancel Send and Sync

It is useless otherwise in most multithreaded applications.
This commit is contained in:
Michal 'vorner' Vaner 2019-08-30 11:59:52 +02:00
parent fc4d7e8058
commit 159c422afa
No known key found for this signature in database
GPG Key ID: F700D0C019E4C66F
1 changed files with 1 additions and 1 deletions

View File

@ -140,7 +140,7 @@ pub struct ObserveWhen<'a, T, F> {
static ID_GENERATOR: AtomicUsize = AtomicUsize::new(0);
/// A handle to cancel a flush observer.
pub struct OnFlushCancel(Arc<dyn Fn()>);
pub struct OnFlushCancel(Arc<dyn Fn() + Send + Sync>);
impl Cancel for OnFlushCancel {
fn cancel(&self) {