Merge rust-bitcoin/rust-secp256k1#365: Fixed docs(rs)
314e8755df
Clarify `global-context` feature (Martin Habovstiak)d52ab85dd5
Added missing features to docs.rs config (Martin Habovstiak) Pull request description: Sadly, I missed two details in #353: features missing in docs.rs configuration and `global-context` being a bit confusing. This PR fixes those, see commit messages for details. ACKs for top commit: apoelstra: ACK314e8755df
Tree-SHA512: 01bed8ae2f30adcbdd436b514f08a084492d7f4e1a739ca62e6d8b8547e379c01faeda3522733c27ab615acbb4c6cff60e13906cc88a0d2b90e439e7da517466
This commit is contained in:
commit
d068fd7d41
|
@ -14,7 +14,7 @@ autoexamples = false # Remove when edition 2018 https://github.com/rust-lang/car
|
||||||
|
|
||||||
# Should make docs.rs show all functions, even those behind non-default features
|
# Should make docs.rs show all functions, even those behind non-default features
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
features = [ "rand", "rand-std", "serde", "recovery" ]
|
features = [ "rand", "rand-std", "serde", "bitcoin_hashes", "recovery", "global-context" ]
|
||||||
rustdoc-args = ["--cfg", "docsrs"]
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|
|
@ -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")]
|
||||||
|
|
|
@ -190,7 +190,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