Skip to content

Commit

Permalink
Merge pull request #145 from mlthlschr/main
Browse files Browse the repository at this point in the history
Align emit_to signature to tauri
  • Loading branch information
oscartbeaumont authored Nov 11, 2024
2 parents 2de2b0f + 1e608a7 commit 12e6774
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ pub trait Event: NamedType {
)
}

/// Emits an event to all [targets](EventTarget) matching the given target.
/// Emits an event to all [targets](EventTarget).
fn emit<R: Runtime, H: Emitter<R> + Manager<R>>(&self, handle: &H) -> tauri::Result<()>
where
Self: Serialize + Clone,
Expand All @@ -162,16 +162,16 @@ pub trait Event: NamedType {
}

/// Emits an event to all [targets](EventTarget) matching the given target.
fn emit_to<R: Runtime, H: Emitter<R> + Manager<R>>(
fn emit_to<R: Runtime, H: Emitter<R> + Manager<R>, I: Into<EventTarget>>(
&self,
handle: &H,
label: &str,
target: I,
) -> tauri::Result<()>
where
Self: Serialize + Clone,
{
handle.emit_to(
label,
target,
&EventRegistry::get_event_name::<Self, _>(handle, Self::NAME),
self,
)
Expand Down

0 comments on commit 12e6774

Please sign in to comment.