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

Duplication #18

Merged
merged 8 commits into from
Oct 26, 2024
Merged

Duplication #18

merged 8 commits into from
Oct 26, 2024

Conversation

ozgunozerk
Copy link
Owner

This pr:

  • fixes the double invocation problem:
    • previously: when this macro is invoked on more than 1 struct in the same module/file, it creates the same sealed traits and structs, which causing compile error
    • this is fixed by adding the name of the struct as a prefix to these common structs & traits
  • adds support to retain the full signature of the methods (async, const, generics, etc.)
    • previously we were only retaining the lifetimes and generics for the struct
  • adds support to enable wrapping the struct in complex types like Result<Option<Struct>> for the methods
    • in both return type
    • and in the body

Fixes #16 and #17

@ozgunozerk ozgunozerk self-assigned this Oct 26, 2024
@ozgunozerk ozgunozerk merged commit e2e9dd9 into main Oct 26, 2024
2 checks passed
@ozgunozerk ozgunozerk deleted the duplication branch October 26, 2024 10:24
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.

🐞 [Bug]: Multiple invocations fail
1 participant