Skip to content

Commit 8e96aba

Browse files
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.
1 parent 96d2242 commit 8e96aba

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,10 @@ mod macros;
143143
#[macro_use]
144144
mod secret;
145145
mod context;
146+
mod key;
147+
146148
pub mod constants;
147149
pub mod ecdh;
148-
pub mod key;
149150
pub mod schnorrsig;
150151
#[cfg(feature = "recovery")]
151152
pub mod recovery;
@@ -154,6 +155,7 @@ mod serde_util;
154155

155156
pub use key::SecretKey;
156157
pub use key::PublicKey;
158+
pub use key::ONE_KEY;
157159
pub use context::*;
158160
use core::marker::PhantomData;
159161
use core::ops::Deref;

src/secret.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ impl SecretKey {
9090
/// # Example
9191
///
9292
/// ```
93-
/// use secp256k1::key::ONE_KEY;
93+
/// use secp256k1::ONE_KEY;
9494
/// let key = ONE_KEY;
9595
/// // Normal display hides value
9696
/// assert_eq!(
@@ -123,7 +123,7 @@ impl KeyPair {
123123
/// # Example
124124
///
125125
/// ```
126-
/// use secp256k1::key::ONE_KEY;
126+
/// use secp256k1::ONE_KEY;
127127
/// use secp256k1::schnorrsig::KeyPair;
128128
/// use secp256k1::Secp256k1;
129129
///

0 commit comments

Comments
 (0)