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

Add $crate:: metavariable to the oid! macro #25

Merged
merged 1 commit into from
Jun 25, 2021

Conversation

randombit
Copy link
Contributor

This allows using the oid macro without having to import BigUint

A little more context on this: I'm using RustCrypto/RSA which uses a fork of num-bigint and so within my code I already have a BigUint imported, but it is a different type than simple_asn1s BigUint. Currently to use the oid macro I must have BigUint imported from simple_asn1 and using that name.

But also just ergonomically, if someone is just creating an OID and not otherwise encoding integers there doesn't seem to be any need for them to know that there are bigints under the hood.

https://doc.rust-lang.org/reference/macros-by-example.html#hygiene

This allows using the oid macro without having to import BigUint
@acw acw merged commit 4ea0b30 into acw:master Jun 25, 2021
@acw
Copy link
Owner

acw commented Jun 25, 2021

Thanks! This and your previous PR are now pushed to crates as v0.5.4.

@randombit
Copy link
Contributor Author

Awesome thank you!

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.

2 participants