From 35132a88feba106f1f7bc45c7c6358c3e90dd839 Mon Sep 17 00:00:00 2001 From: Malte Hoelscher Date: Sat, 9 Nov 2024 21:23:07 +0100 Subject: [PATCH 1/2] doc: align comment with tauri --- src/event.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/event.rs b/src/event.rs index 9f73ce1..2efa934 100644 --- a/src/event.rs +++ b/src/event.rs @@ -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 + Manager>(&self, handle: &H) -> tauri::Result<()> where Self: Serialize + Clone, From 1e608a7a403eb37bd5d653a0d20a9d46b0310bbb Mon Sep 17 00:00:00 2001 From: Malte Hoelscher Date: Sat, 9 Nov 2024 21:23:52 +0100 Subject: [PATCH 2/2] fix: align emit_to signature to tauri --- src/event.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/event.rs b/src/event.rs index 2efa934..68af56d 100644 --- a/src/event.rs +++ b/src/event.rs @@ -162,16 +162,16 @@ pub trait Event: NamedType { } /// Emits an event to all [targets](EventTarget) matching the given target. - fn emit_to + Manager>( + fn emit_to + Manager, I: Into>( &self, handle: &H, - label: &str, + target: I, ) -> tauri::Result<()> where Self: Serialize + Clone, { handle.emit_to( - label, + target, &EventRegistry::get_event_name::(handle, Self::NAME), self, )