Skip to content

Commit

Permalink
Merge pull request #52 from pezcore/doc/feature-gated-items
Browse files Browse the repository at this point in the history
Enable documentation of feature-gated items in docsrs
  • Loading branch information
stevenroose authored Aug 28, 2023
2 parents 0f52eca + 53090ea commit d6681c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,7 @@ rand_core = { version = "0.6.4", optional = false }
crate_rand = { package = "rand", version = "0.8.5", optional = false }
bitcoin_hashes = "0.11.0" # enable default features for test


[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
5 changes: 3 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

//! # BIP39 Mnemonic Codes
//!
//! https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki
//! Library crate implementing [BIP39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki)
//!

#![deny(non_upper_case_globals)]
Expand All @@ -24,6 +24,7 @@
#![deny(unused_imports)]
#![deny(missing_docs)]
#![cfg_attr(all(not(test), not(feature = "std")), no_std)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

#[cfg(any(test, feature = "std"))]
pub extern crate core;
Expand Down Expand Up @@ -531,7 +532,7 @@ impl Mnemonic {

/// Convert the mnemonic back to the entropy used to generate it.
/// The return value is a byte array and the size.
/// Use [Mnemonic::to_entropy] (needs `std`) to get a [Vec<u8>].
/// Use [Mnemonic::to_entropy] (needs `std`) to get a [`Vec<u8>`].
pub fn to_entropy_array(&self) -> ([u8; 33], usize) {
// We unwrap errors here because this method can only be called on
// values that were already previously validated.
Expand Down

0 comments on commit d6681c0

Please sign in to comment.