Skip to content

Conversation

@sashetophizika
Copy link
Contributor

Currently the dispatch! macro does not work with dispatchers that do not have any additional parameters. This PR fixes it.

I am getting some incorrect argument diagnostics from rust_analyzer, but everything compiles and clippy does not mind so I don't know.

@sashetophizika
Copy link
Contributor Author

Sorry, it turns out that this is a nightmare.

Are you willing to accept an implementation that separates the macro in two (one that specifies the instance and one that doesn't)? I can fix the examples that break if you do. If not, just close.

@yavko
Copy link
Member

yavko commented Oct 3, 2025

Sorry, it turns out that this is a nightmare.

Are you willing to accept an implementation that separates the macro in two (one that specifies the instance and one that doesn't)? I can fix the examples that break if you do. If not, just close.

Sure

@sashetophizika
Copy link
Contributor Author

Alternatively this implementation that i just pushed changes the separator for the instance argument to ; and matches properly for all use cases. This way we can keep it one macro.

@yavko
Copy link
Member

yavko commented Oct 4, 2025

Alternatively this implementation that i just pushed changes the separator for the instance argument to ; and matches properly for all use cases. This way we can keep it one macro.

Great

@sashetophizika
Copy link
Contributor Author

If you like it then I think it can be merged.

Copy link
Member

@yavko yavko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this

@yavko yavko merged commit c8392c2 into hyprland-community:master Oct 6, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants