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

Allowing specifying the num_enum crate name when deriving TryFromPrimitive #76

Open
yshui opened this issue Sep 12, 2022 · 1 comment
Open

Comments

@yshui
Copy link

yshui commented Sep 12, 2022

Useful when num_enum is being reexported from another crate, because otherwise I get:

Warning: Could not find `num_enum` in `dependencies` or `dev-dependencies` in `Cargo.toml`!
    => defaulting to `num_enum`

And compile fails.

For example, serde accepts a #[serde(crate = "")] attribute for this.

@spearman
Copy link

spearman commented Jan 2, 2023

num-derive also has a similar attribute so it can find the num_traits crate as a different identifier: https://docs.rs/num-derive/0.3.3/num_derive/#explicit-import

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

No branches or pull requests

2 participants