Skip to content

Commit d63e95b

Browse files
committed
Remove wildcard re-exports of context types
Wildcards make it hard to grep for where stuff comes from, explicit imports and re-exports are ... more explicit. Import and re-export explicitly instead of by using wildcards.
1 parent 65d54e7 commit d63e95b

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
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

+8-3
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,7 +184,12 @@ 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;
190195
pub use crate::key::{PublicKey, SecretKey, *};

0 commit comments

Comments
 (0)