Clarify `global-context` feature
Previously only `global-context-less-secure` was shown in the doc even though `global-context` may also work. This was strictly correct because `global-context` implies `global-context-less-secure` which is also documented but people could miss it or forget about it and then worry about security or worse, enable less secure feature. Calling out both fetures seems useful, even important and thankfully doesn't seem to cause too much noise in the docs.
This commit is contained in:
parent
d52ab85dd5
commit
314e8755df
|
@ -10,7 +10,7 @@ use Secp256k1;
|
||||||
pub use self::alloc_only::*;
|
pub use self::alloc_only::*;
|
||||||
|
|
||||||
#[cfg(feature = "global-context-less-secure")]
|
#[cfg(feature = "global-context-less-secure")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "global-context-less-secure")))]
|
#[cfg_attr(docsrs, doc(cfg(any(feature = "global-context", feature = "global-context-less-secure"))))]
|
||||||
/// Module implementing a singleton pattern for a global `Secp256k1` context
|
/// Module implementing a singleton pattern for a global `Secp256k1` context
|
||||||
pub mod global {
|
pub mod global {
|
||||||
#[cfg(feature = "global-context")]
|
#[cfg(feature = "global-context")]
|
||||||
|
|
|
@ -188,7 +188,7 @@ use core::{mem, fmt, str};
|
||||||
use ffi::{CPtr, types::AlignedType};
|
use ffi::{CPtr, types::AlignedType};
|
||||||
|
|
||||||
#[cfg(feature = "global-context-less-secure")]
|
#[cfg(feature = "global-context-less-secure")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "global-context-less-secure")))]
|
#[cfg_attr(docsrs, doc(cfg(any(feature = "global-context", feature = "global-context-less-secure"))))]
|
||||||
pub use context::global::SECP256K1;
|
pub use context::global::SECP256K1;
|
||||||
|
|
||||||
#[cfg(feature = "bitcoin_hashes")]
|
#[cfg(feature = "bitcoin_hashes")]
|
||||||
|
|
Loading…
Reference in New Issue