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

Added custom crate path for bytemuck with tests #209

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

AndriBaal
Copy link
Contributor

Adds the option to specify a custom path for the bytemuck crate, instead of ::bytemuck. This allows the bytemuck macros to be reexported.

@Lokathor Lokathor added semver-minor semver minor change semver-derive We need to update the main crate's use of the derive crate labels Oct 1, 2023
@Lokathor Lokathor requested a review from fu5ha October 6, 2023 16:25
Copy link
Collaborator

@fu5ha fu5ha left a comment

Choose a reason for hiding this comment

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

Thanks! Overall lgtm, I think the attribute parsing logic can be simplified a bit though.


attr.parse_nested_meta(|meta| {
if meta.path.is_ident(ATTR_NAME) {
let expr: syn::Expr = meta.value()?.parse()?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

You should be able to just parse directly to a syn::LitStr here, no?

@Lokathor Lokathor merged commit c705218 into Lokathor:main Oct 20, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-derive We need to update the main crate's use of the derive crate semver-minor semver minor change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants