Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove InternalEventHandler #2952

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

mkrasnitski
Copy link
Collaborator

Since having both a regular event handler and a raw handler at the same time is now supported, the InternalEventHandler enum is no longer needed to ensure mutual exclusivity. Additionally, there was a subtle bug introduced when the Both variant was added: ratelimit events and shard stage update events would not be dispatched because the conditionals to dispatch those events only checked for the Normal variant. Inlining the regular/raw event handler fields improves ergonomics and fixes said bug.

@github-actions github-actions bot added the gateway Related to the `gateway` module. label Aug 23, 2024
@arqunis arqunis added enhancement An improvement to Serenity. breaking change The public API is changed, resulting in miscompilations or unexpected new behaviour for users labels Aug 26, 2024
@arqunis arqunis merged commit c3d4a33 into serenity-rs:next Aug 26, 2024
21 checks passed
@mkrasnitski mkrasnitski deleted the internal-event-handler branch August 27, 2024 14:49
GnomedDev pushed a commit to GnomedDev/serenity that referenced this pull request Oct 7, 2024
Since having both a regular event handler and a raw handler at the same time is
now supported, the `InternalEventHandler` enum is no longer needed to ensure
mutual exclusivity. 

Additionally, there was a subtle bug introduced when the `Both` variant was
added: ratelimit events and shard stage update events would not be dispatched
because the conditionals to dispatch those events only checked for the `Normal`
variant. Inlining the regular/raw event handler fields improves ergonomics and
fixes said bug.
GnomedDev pushed a commit to GnomedDev/serenity that referenced this pull request Oct 20, 2024
Since having both a regular event handler and a raw handler at the same time is
now supported, the `InternalEventHandler` enum is no longer needed to ensure
mutual exclusivity. 

Additionally, there was a subtle bug introduced when the `Both` variant was
added: ratelimit events and shard stage update events would not be dispatched
because the conditionals to dispatch those events only checked for the `Normal`
variant. Inlining the regular/raw event handler fields improves ergonomics and
fixes said bug.
GnomedDev pushed a commit that referenced this pull request Oct 20, 2024
Since having both a regular event handler and a raw handler at the same time is
now supported, the `InternalEventHandler` enum is no longer needed to ensure
mutual exclusivity. 

Additionally, there was a subtle bug introduced when the `Both` variant was
added: ratelimit events and shard stage update events would not be dispatched
because the conditionals to dispatch those events only checked for the `Normal`
variant. Inlining the regular/raw event handler fields improves ergonomics and
fixes said bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change The public API is changed, resulting in miscompilations or unexpected new behaviour for users enhancement An improvement to Serenity. gateway Related to the `gateway` module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants