-
Notifications
You must be signed in to change notification settings - Fork 566
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
Allow druid_derive macros in druid crate #731
Conversation
This makes use of feature `extern_crate_self` to refer to the current crate with another name, in this case, druid. This allows druid_derive macros to expand to something like `druid::Data` instead of `crate::Data`.
If putting |
I haven't seen this solution before, can you link to any information on it? Are there any major drawbacks? |
This feature was primarily implemented to solve problems like this. Here[1] is the tracking issue for the feature and here is some discussion[2]. The only drawback is that you have |
Okay, then I have one additional request for this PR; in |
// we have these impls mostly for our 'flex' example, but I could imagine | ||
// them being broadly useful? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know what to do with this comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can just delete that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great, thanks!
This makes use of feature
extern_crate_self
to refer to the currentcrate with another name, in this case, druid. This allows druid_derive
macros to expand to something like
druid::Data
instead ofcrate::Data
.Closes #650