Skip to content
This repository has been archived by the owner on Dec 22, 2020. It is now read-only.

Remove redundant "namespacing" from type names #112

Merged
merged 1 commit into from
Oct 7, 2018

Conversation

tony-iqlusion
Copy link
Contributor

@tony-iqlusion tony-iqlusion commented Oct 7, 2018

  • Ed25519PublicKey => ed25519::PublicKey
  • Ed25519Signature => ed25519::Signature
  • EcdsaPublicKey => ecdsa::PublicKey
  • EcdsaSignature => ecdsa::Signature

These names were prefixed with the signature type previously to avoid clashes with traits of the same name (i.e. signatory::PublicKey and signatory::Signature) however the namespace clash can also be avoided by using the ed25519 and ecdsa module names.

This is considered a Rust best practice:

rust-lang/rfcs#356

* `Ed25519PublicKey` => `ed25519::PublicKey`
* `Ed25519Signature` => `ed25519::Signature`
* `EcdsaPublicKey` => `ecdsa::PublicKey`
* `EcdsaSignature` => `ecdsa::Signature`

These names were prefixed with the signature type previously to avoid
clashes with traits of the same name (i.e. `signatory::PublicKey` and
`signatory::Signature`) however the namespace clash can also be avoided
by using the `ed25519` and `ecdsa` module names.

This is considered a Rust best practice:

rust-lang/rfcs#356
@tarcieri tarcieri merged commit 3a6d72f into master Oct 7, 2018
@tarcieri tarcieri deleted the namespacing-fixups branch October 7, 2018 19:18
@tony-iqlusion tony-iqlusion mentioned this pull request Oct 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants