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

Factor out collector methods on models into traits #3055

Merged
merged 3 commits into from
Nov 27, 2024

Conversation

mkrasnitski
Copy link
Collaborator

@mkrasnitski mkrasnitski commented Nov 22, 2024

Moves the feature-gated collector methods on UserId, MessageId, etc. into four traits named CollectMessages, CollectReactions, CollectModalInteractions and CollectComponentInteractions. Also, move the quick modal machinery into the collector module and define a QuickModal trait. This fully removes any collector feature gates from the model types.

@github-actions github-actions bot added model Related to the `model` module. utils Related to the `utils` module. examples Related to Serenity's examples. collector Related to the `collector` module. labels Nov 22, 2024
@mkrasnitski mkrasnitski added the breaking change The public API is changed, resulting in miscompilations or unexpected new behaviour for users label Nov 22, 2024
@github-actions github-actions bot added the builder Related to the `builder` module. label Nov 25, 2024
Copy link
Member

@GnomedDev GnomedDev left a comment

Choose a reason for hiding this comment

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

Looks good, just a small nitpick

examples/testing/src/main.rs Outdated Show resolved Hide resolved
@arqunis arqunis added the enhancement An improvement to Serenity. label Nov 26, 2024
@arqunis arqunis merged commit 7827e5a into serenity-rs:next Nov 27, 2024
21 checks passed
@mkrasnitski mkrasnitski deleted the collector-traits branch November 28, 2024 00:14
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 builder Related to the `builder` module. collector Related to the `collector` module. enhancement An improvement to Serenity. examples Related to Serenity's examples. model Related to the `model` module. utils Related to the `utils` module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants