Skip to content

Commit

Permalink
Merge pull request #101 from jsimonrichard/main
Browse files Browse the repository at this point in the history
Allow paths in collect_events macro
  • Loading branch information
oscartbeaumont authored Jun 8, 2024
2 parents 3768a3f + f161255 commit 09b2fd4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/app/src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ fn main() {
typesafe_errors_using_thiserror,
typesafe_errors_using_thiserror_with_value
])
.events(tauri_specta::collect_events![DemoEvent, EmptyEvent])
.events(tauri_specta::collect_events![crate::DemoEvent, EmptyEvent])
.types(TypeCollection::default().register::<Custom>())
.config(specta::ts::ExportConfig::default().formatter(specta::ts::formatter::prettier))
.types(TypeCollection::default().register::<Testing>())
Expand Down
2 changes: 1 addition & 1 deletion src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ pub type CollectEventsTuple = (EventCollection, Vec<EventDataType>, specta::Type

#[macro_export]
macro_rules! collect_events {
($($event:ident),* $(,)?) => {{
($($event:path),* $(,)?) => {{
let mut collection: $crate::EventCollection = ::core::default::Default::default();

$(collection.register::<$event>();)*
Expand Down

0 comments on commit 09b2fd4

Please sign in to comment.