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

x509-cert: re-export spki types without *Owned suffixes #1534

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

tarcieri
Copy link
Member

Re-exports the following with shorter names:

  • spki::AlgorithmIdentifierOwned => x509_cert::AlgorithmIdentifier
  • spki::SubjectPublicKeyInfoOwned => x509_cert::SubjectPublicKeyInfo

These names are already quite long to begin with even without the *Owned suffix.

The x509-cert crate has a hard dependency on alloc and always uses the *Owned types, so this allows for more convenient names in this scenario.

Re-exports the following with shorter names:
- `spki::AlgorithmIdentifierOwned` => `x509_cert::AlgorithmIdentifier`
- `spki::SubjectPublicKeyInfoOwned` => `x509_cert::SubjectPublicKeyInfo`

These names are already quite long to begin with even without the
`*Owned` suffix.

The `x509-cert` crate has a hard dependency on `alloc` and always uses
the `*Owned` types, so this allows for more convenient names in this
scenario.
@tarcieri tarcieri requested a review from baloo September 27, 2024 13:08
@tarcieri
Copy link
Member Author

Thought shorter names would be nice, but it does risk being a bit confusing in regard to x509_cert::AlgorithmIdentifier not being the same as spki::AlgorithmIdentifier, especially when accessed as x509_cert::spki.

@tarcieri tarcieri merged commit 52f302d into master Sep 27, 2024
53 checks passed
@tarcieri tarcieri deleted the x509-cert/re-export-without-owned-aliases branch September 27, 2024 15:50
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