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

Use impl instead of ProtocolObject where possible #517

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

madsmtm
Copy link
Owner

@madsmtm madsmtm commented Sep 21, 2023

Builds upon #516.

We now use &(impl MyProtocol + Message) instead of &ProtocolObject<dyn MyProtocol> as parameters to functions, this allows users to pass in their objects to these functions much more easily.

I'm not sure it's worth the tradeoff in code size though (since now a lot of methods are generic where they don't really have to be), will have to think about.

Alternative to #460 (that one is still strictly cleaner, but probably also not really possible in current Rust (?)).

@madsmtm madsmtm added enhancement New feature or request A-framework Affects the framework crates and the translator for them labels Sep 21, 2023
@madsmtm madsmtm added this to the Polish icrate milestone Sep 21, 2023
@madsmtm madsmtm force-pushed the protocol-fixes branch 6 times, most recently from 2b57f62 to 1c663ba Compare December 3, 2023 08:11
Base automatically changed from protocol-fixes to master December 3, 2023 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-framework Affects the framework crates and the translator for them enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant