Skip to content

Commit

Permalink
Remove wildcard re-exports of context types
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tcharding committed Mar 26, 2024
1 parent 5fa3623 commit a931496
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use core::mem::ManuallyDrop;
use core::ptr::NonNull;

#[cfg(feature = "alloc")]
pub use self::alloc_only::*;
pub use self::alloc_only::{All, SignOnly, VerifyOnly};
use crate::ffi::types::{c_uint, c_void, AlignedType};
use crate::ffi::{self, CPtr};
use crate::{Error, Secp256k1};
Expand Down
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,11 @@ pub use secp256k1_sys as ffi;
#[cfg(feature = "serde")]
pub use serde;

pub use crate::context::*;
#[cfg(feature = "alloc")]
pub use crate::context::{All, SignOnly, VerifyOnly};
pub use crate::context::{
AllPreallocated, Context, SignOnlyPreallocated, Signing, Verification, VerifyOnlyPreallocated,
};
use crate::ffi::types::AlignedType;
use crate::ffi::CPtr;
pub use crate::key::{PublicKey, SecretKey, *};
Expand Down

0 comments on commit a931496

Please sign in to comment.