Skip to content

Commit

Permalink
Relax Sync bound on FnMut and FnOnce callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
gyscos committed Aug 5, 2024
1 parent 5e9f741 commit d372abb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cursive-core/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl Callback {
/// If this methods tries to call itself, nested calls will be no-ops.
pub fn from_fn_mut<F>(f: F) -> Self
where
F: 'static + FnMut(&mut Cursive) + Send + Sync,
F: 'static + FnMut(&mut Cursive) + Send,
{
Self::from_fn(crate::immut1!(f))
}
Expand All @@ -202,7 +202,7 @@ impl Callback {
/// After being called once, the callback will become a no-op.
pub fn from_fn_once<F>(f: F) -> Self
where
F: 'static + FnOnce(&mut Cursive) + Send + Sync,
F: 'static + FnOnce(&mut Cursive) + Send,
{
Self::from_fn_mut(crate::once1!(f))
}
Expand Down Expand Up @@ -256,7 +256,7 @@ impl EventResult {
/// After being called once, the callback will become a no-op.
pub fn with_cb_once<F>(f: F) -> Self
where
F: 'static + FnOnce(&mut Cursive) + Send + Sync,
F: 'static + FnOnce(&mut Cursive) + Send,
{
EventResult::Consumed(Some(Callback::from_fn_once(f)))
}
Expand Down

0 comments on commit d372abb

Please sign in to comment.