Skip to content

Commit 3c111a2

Browse files
committed
Merge #384: Enable building docs in the CI pipeline
c40d350 CI: Build the docs (Tobin C. Harding) 3ff4f14 Fix docs links (Tobin C. Harding) 432c49b Remove reference to private types (Tobin C. Harding) Pull request description: First fix all the docs build errors then enable docs build in CI, as we do in other crates in our stack. ACKs for top commit: apoelstra: ACK c40d350 sanket1729: re-ACK c40d350 Tree-SHA512: d5370db7db6a3f2fa7cfbacc8fa4c55073c42c353fb763c19d0f42a3abfe7362ffb9eb97b3fa20399481a2cbe45e2962c092249be06197b37f5839db55deaa5b
2 parents 9dc1d47 + c40d350 commit 3c111a2

File tree

6 files changed

+24
-20
lines changed

6 files changed

+24
-20
lines changed

.github/workflows/rust.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,26 @@ jobs:
2727
DO_LINT: true
2828
run: ./contrib/test.sh
2929

30-
bench_nightly:
31-
name: Bench + Tests
30+
Nightly:
31+
name: Bench + Docs
3232
runs-on: ubuntu-latest
33-
strategy:
34-
matrix:
35-
rust:
36-
- nightly
3733
steps:
3834
- name: Checkout Crate
3935
uses: actions/checkout@v2
4036
- name: Checkout Toolchain
4137
uses: actions-rs/toolchain@v1
4238
with:
4339
profile: minimal
44-
toolchain: ${{ matrix.rust }}
40+
toolchain: nightly
4541
override: true
46-
- name: Running cargo test
42+
- name: Running benchmarks
4743
env:
4844
DO_BENCH: true
4945
run: ./contrib/test.sh
46+
- name: Building docs
47+
env:
48+
DO_DOCS: true
49+
run: ./contrib/test.sh
5050

5151
UnitTests:
5252
name: Tests

contrib/test.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,17 @@ cargo build --examples
4444
# run all examples
4545
run-parts ./target/debug/examples
4646

47-
# Bench if told to
47+
# Bench if told to (this only works with the nightly toolchain)
4848
if [ "$DO_BENCH" = true ]
4949
then
5050
cargo bench --features="unstable compiler"
5151
fi
5252

53+
# Build the docs if told to (this only works with the nightly toolchain)
54+
if [ "$DO_DOCS" = true ]; then
55+
RUSTDOCFLAGS="--cfg docsrs" cargo doc --all --features="$FEATURES"
56+
fi
57+
5358
# Run Integration tests if told so
5459
if [ -n "$BITCOINVERSION" ]; then
5560
set -e

src/descriptor/key.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -242,13 +242,10 @@ impl fmt::Display for DescriptorPublicKey {
242242
}
243243

244244
impl DescriptorSecretKey {
245-
/// Return the public version of this key, by applying either
246-
/// [`SinglePriv::to_public`] or [`DescriptorXKey<bip32::ExtendedPrivKey>::to_public`]
247-
/// depending on the type of key.
245+
/// Returns the public version of this key.
248246
///
249-
/// If the key is an "XPrv", the hardened derivation steps will be applied before converting it
250-
/// to a public key. See the documentation of [`DescriptorXKey<bip32::ExtendedPrivKey>::to_public`]
251-
/// for more details.
247+
/// If the key is an "XPrv", the hardened derivation steps will be applied
248+
/// before converting it to a public key.
252249
pub fn to_public<C: Signing>(
253250
&self,
254251
secp: &Secp256k1<C>,

src/descriptor/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -667,9 +667,9 @@ impl Descriptor<DescriptorPublicKey> {
667667

668668
/// Derive a [`Descriptor`] with a concrete [`bitcoin::PublicKey`] at a given index
669669
/// Removes all extended pubkeys and wildcards from the descriptor and only leaves
670-
/// concrete [`bitcoin::PublicKey`]. All [`crate::XOnlyKey`]s are converted to [`bitcoin::PublicKey`]
671-
/// by adding a default(0x02) y-coordinate. For [`crate::descriptor::Tr`] descriptor,
672-
/// spend info is also cached.
670+
/// concrete [`bitcoin::PublicKey`]. All [`bitcoin::XOnlyPublicKey`]s are converted
671+
/// to [`bitcoin::PublicKey`]s by adding a default(0x02) y-coordinate. For [`Tr`]
672+
/// descriptor, spend info is also cached.
673673
///
674674
/// # Examples
675675
///

src/interpreter/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ impl<'txin> Interpreter<'txin> {
217217
}
218218

219219
/// Verify a signature for a given transaction and prevout information
220-
/// This is a low level API, [`Interpreter::iter`] or [`Interpreter::iter_assume_sig`]
220+
/// This is a low level API, [`Interpreter::iter`] or [`Interpreter::iter_assume_sigs`]
221221
/// should satisfy most use-cases.
222222
/// Returns false if
223223
/// - the signature verification fails

src/psbt/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,10 @@ pub trait PsbtExt {
553553
/// # Arguments:
554554
///
555555
/// * `idx`: The input index of psbt to sign
556-
/// * `cache`: The [`sighash::SighashCache`] for used to cache/read previously cached computations
556+
/// * `cache`: The [`SighashCache`] for used to cache/read previously cached computations
557557
/// * `tapleaf_hash`: If the output is taproot, compute the sighash for this particular leaf.
558+
///
559+
/// [`SighashCache`]: bitcoin::util::sighash::SighashCache
558560
fn sighash_msg<T: Deref<Target = bitcoin::Transaction>>(
559561
&self,
560562
idx: usize,

0 commit comments

Comments
 (0)