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

aead: re-export rand_core #682

Merged
merged 2 commits into from
Jul 10, 2021
Merged

aead: re-export rand_core #682

merged 2 commits into from
Jul 10, 2021

Conversation

tarcieri
Copy link
Member

This PR implements the changes proposed in #681 to simplify access to the rand_core traits and OsRng.

rand_core is conditionally re-exported when the eponymous crate feature is enabled.

Additionally, the std crate feature enables rand_core/std, which permits access to OsRng as aead::rand_core::OsRng.

@tarcieri tarcieri requested a review from newpavlov July 10, 2021 17:52
This implements the changes proposed in #681 to simplify access to the
`rand_core` traits and `OsRng`.

`rand_core` is conditionally re-exported when the eponymous crate
feature is enabled.

Additionally, the `std` crate feature enables `rand_core/std`, which
permits access to `OsRng` as `aead::rand_core::OsRng`.
Copy link
Member

@newpavlov newpavlov left a comment

Choose a reason for hiding this comment

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

Looks good! Although I am not sure about enabling it by default. Right now in most implementation crates we use default-features = false on the aead dependency, so it will have no effect. It could be better to enable it by default in implementation crates and then forward it to aead. It will be similar to how we handle std for example in the has crates.

@tarcieri
Copy link
Member Author

Removed the default feature.

@tarcieri tarcieri merged commit 628fe82 into master Jul 10, 2021
@tarcieri tarcieri deleted the aead/re-export-rand_core branch July 10, 2021 20:40
This was referenced Jul 10, 2021
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.

None yet

2 participants