Make `key` module private

We re-export all structs residing in that module. There is no reason
to expose the internal module structure of the library publicly.
This commit is contained in:
Thomas Eizinger 2021-09-09 18:49:47 +10:00
parent 96d2242f6a
commit 8e96abae39
No known key found for this signature in database
GPG Key ID: 651AC83A6C6C8B96
2 changed files with 5 additions and 3 deletions

View File

@ -143,9 +143,10 @@ mod macros;
#[macro_use]
mod secret;
mod context;
mod key;
pub mod constants;
pub mod ecdh;
pub mod key;
pub mod schnorrsig;
#[cfg(feature = "recovery")]
pub mod recovery;
@ -154,6 +155,7 @@ mod serde_util;
pub use key::SecretKey;
pub use key::PublicKey;
pub use key::ONE_KEY;
pub use context::*;
use core::marker::PhantomData;
use core::ops::Deref;

View File

@ -90,7 +90,7 @@ impl SecretKey {
/// # Example
///
/// ```
/// use secp256k1::key::ONE_KEY;
/// use secp256k1::ONE_KEY;
/// let key = ONE_KEY;
/// // Normal display hides value
/// assert_eq!(
@ -123,7 +123,7 @@ impl KeyPair {
/// # Example
///
/// ```
/// use secp256k1::key::ONE_KEY;
/// use secp256k1::ONE_KEY;
/// use secp256k1::schnorrsig::KeyPair;
/// use secp256k1::Secp256k1;
///