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

do not require PhantomData to be imported #3

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

cbgbt
Copy link
Contributor

@cbgbt cbgbt commented Oct 9, 2024

The state-shift macros currently require the user to have PhantomData in scope. This qualifies the symbols in the macro so that it always uses PhantomData from std and cannot be confused by other symbols that the user may have renamed, for example.

PR Checklist

  • Tests
  • Documentation

Copy link
Owner

@ozgunozerk ozgunozerk left a comment

Choose a reason for hiding this comment

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

That's a great suggestion, thanks for pointing that out!

I'll double check if some other changes need to be done in the documentation, etc.

And then we can merge it!

@ozgunozerk ozgunozerk linked an issue Oct 9, 2024 that may be closed by this pull request
@ozgunozerk
Copy link
Owner

Would be great if you can also change this line in readme:
_state: (PhantomData), // Don't forget this!
to
_state: (::std::marker::PhantomData), // Don't forget this!,
so that the guidelines would work out of the box.

Will merge it after that!

@ozgunozerk
Copy link
Owner

Will edit the readme later, let's merge it! :shipit:

@ozgunozerk ozgunozerk merged commit 7ce5d89 into ozgunozerk:main Oct 9, 2024
2 checks 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.

🎁 [Feature Request]: Use explicit path for PhantomData import
2 participants