Skip to content

Commit

Permalink
Merge pull request #141 from mlthlschr/main
Browse files Browse the repository at this point in the history
fix: use FnOnce instead of Fn in Event::once where clause
  • Loading branch information
oscartbeaumont authored Oct 28, 2024
2 parents 9aa4417 + cc4c41b commit 2de2b0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ pub trait Event: NamedType {
/// Listen to an event on this manager only once.
fn once<F, R: Runtime, H: Listener<R> + Manager<R>>(handle: &H, handler: F) -> EventId
where
F: Fn(TypedEvent<Self>) + Send + 'static,
F: FnOnce(TypedEvent<Self>) + Send + 'static,
Self: DeserializeOwned,
{
handle.once(
Expand Down

0 comments on commit 2de2b0f

Please sign in to comment.