Skip to content

Commit b370f67

Browse files
committed
Merge #682: Remove wildcard re-exports
0da394e Remove wildcard re-exports of key types (Tobin C. Harding) d63e95b Remove wildcard re-exports of context types (Tobin C. Harding) Pull request description: Wildcards make it hard to grep for where stuff comes from, explicit imports and re-exports are ... more explicit. - Patch 1: Re-export the `context` types explicitly. - Patch 2: Re-export the `key` types explicitly. Fix: #681 ACKs for top commit: apoelstra: ACK 0da394e Tree-SHA512: ac92baa9b9abaaff436223bf1d18d286825dbfc8eef401c714314902ff471db4830dce360138845efd781bcb883676d0cbc3db8d691476403eb487a0585edeaa
2 parents 1674406 + 0da394e commit b370f67

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use core::mem::ManuallyDrop;
55
use core::ptr::NonNull;
66

77
#[cfg(feature = "alloc")]
8-
pub use self::alloc_only::*;
8+
pub use self::alloc_only::{All, SignOnly, VerifyOnly};
99
use crate::ffi::types::{c_uint, c_void, AlignedType};
1010
use crate::ffi::{self, CPtr};
1111
use crate::{Error, Secp256k1};

src/lib.rs

+9-4
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ use core::marker::PhantomData;
174174
use core::ptr::NonNull;
175175
use core::{fmt, mem, str};
176176

177-
#[cfg(feature = "global-context")]
178-
pub use context::global::SECP256K1;
177+
#[cfg(all(feature = "global-context", feature = "std"))]
178+
pub use context::global::{self, SECP256K1};
179179
#[cfg(feature = "hashes")]
180180
use hashes::Hash;
181181
#[cfg(feature = "rand")]
@@ -184,10 +184,15 @@ pub use secp256k1_sys as ffi;
184184
#[cfg(feature = "serde")]
185185
pub use serde;
186186

187-
pub use crate::context::*;
187+
#[cfg(feature = "alloc")]
188+
pub use crate::context::{All, SignOnly, VerifyOnly};
189+
pub use crate::context::{
190+
AllPreallocated, Context, PreallocatedContext, SignOnlyPreallocated, Signing, Verification,
191+
VerifyOnlyPreallocated,
192+
};
188193
use crate::ffi::types::AlignedType;
189194
use crate::ffi::CPtr;
190-
pub use crate::key::{PublicKey, SecretKey, *};
195+
pub use crate::key::{InvalidParityValue, Keypair, Parity, PublicKey, SecretKey, XOnlyPublicKey};
191196
pub use crate::scalar::Scalar;
192197

193198
/// Trait describing something that promises to be a 32-byte random number; in particular,

0 commit comments

Comments
 (0)