Fix doc links

This commit is contained in:
LLFourn 2023-02-21 17:34:53 +11:00 committed by Daniela Brozzoni
parent 9edbdf54c9
commit 94a084aafd
No known key found for this signature in database
GPG Key ID: 7DE4F1FDCED0AB87
5 changed files with 13 additions and 6 deletions

View File

@ -24,7 +24,9 @@ jobs:
- name: Update toolchain
run: rustup update
- name: Build docs
run: cargo rustdoc --verbose --all-features -- --cfg docsrs -Dwarnings
run: cargo doc --no-deps
env:
RUSTDOCFLAGS: '--cfg docsrs -Dwarnings'
- name: Upload artifact
uses: actions/upload-artifact@v2
with:

View File

@ -495,6 +495,8 @@ macro_rules! apply_modifier {
/// let (descriptor, key_map, networks) = bdk::descriptor!(wpkh(my_key))?;
/// # Ok::<(), Box<dyn std::error::Error>>(())
/// ```
///
/// [`Vec`]: alloc::vec::Vec
#[macro_export]
macro_rules! descriptor {
( bare ( $( $minisc:tt )* ) ) => ({

View File

@ -462,12 +462,11 @@ impl<Ctx: ScriptContext> From<bip32::ExtendedPrivKey> for ExtendedKey<Ctx> {
/// [`ExtendedPubKey`]: (bip32::ExtendedPubKey)
pub trait DerivableKey<Ctx: ScriptContext = miniscript::Legacy>: Sized {
/// Consume `self` and turn it into an [`ExtendedKey`]
///
/// This can be used to get direct access to `xprv`s and `xpub`s for types that implement this trait,
/// like [`Mnemonic`](bip39::Mnemonic) when the `keys-bip39` feature is enabled.
#[cfg_attr(
feature = "keys-bip39",
doc = r##"
This can be used to get direct access to `xprv`s and `xpub`s for types that implement this trait,
like [`Mnemonic`](bip39::Mnemonic) when the `keys-bip39` feature is enabled.
```rust
use bdk::bitcoin::Network;
use bdk::keys::{DerivableKey, ExtendedKey};

View File

@ -90,7 +90,7 @@ pub struct Wallet<D = ()> {
secp: SecpCtx,
}
/// The update to a [`Wallet`] used in [Wallet::apply_update]. This is usually returned from blockchain data sources.
/// The update to a [`Wallet`] used in [`Wallet::apply_update`]. This is usually returned from blockchain data sources.
/// The type parameter `T` indicates the kind of transaction contained in the update. It's usually a [`bitcoin::Transaction`].
pub type Update<T> = KeychainScan<KeychainKind, ConfirmationTime, T>;
/// Error indicating that something was wrong with an [`Update<T>`].
@ -1689,7 +1689,7 @@ impl<D> Wallet<D> {
/// transactions related to your wallet into it.
///
/// [`commit`]: Self::commit
pub fn apply_udpate<Tx>(&mut self, update: Update<Tx>) -> Result<(), UpdateError>
pub fn apply_update<Tx>(&mut self, update: Update<Tx>) -> Result<(), UpdateError>
where
D: persist::Backend,
Tx: IntoOwned<Transaction> + Clone,

View File

@ -6,6 +6,8 @@
//!
//! Note that `Wallet` does not read this persisted data during operation since it always has a copy
//! in memory
//!
//! [`Wallet`]: crate::Wallet
use crate::KeychainKind;
use bdk_chain::{keychain::KeychainTracker, ConfirmationTime};
@ -13,6 +15,8 @@ use bdk_chain::{keychain::KeychainTracker, ConfirmationTime};
/// persisted. Not all changes made to the [`Wallet`] need to be written to disk right away so you
/// can use [`Persist::stage`] to *stage* it first and then [`Persist::commit`] to finally write it
/// to disk.
///
/// [`Wallet`]: crate::Wallet
#[derive(Debug)]
pub struct Persist<P> {
backend: P,