Skip to content

Commit

Permalink
Fix doc links
Browse files Browse the repository at this point in the history
  • Loading branch information
LLFourn authored and danielabrozzoni committed Mar 2, 2023
1 parent 9edbdf5 commit 94a084a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/nightly_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions crates/bdk/src/descriptor/dsl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 )* ) ) => ({
Expand Down
5 changes: 2 additions & 3 deletions crates/bdk/src/keys/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
4 changes: 2 additions & 2 deletions crates/bdk/src/wallet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>`].
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions crates/bdk/src/wallet/persist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@
//!
//! 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};

/// `Persist` wraps a [`Backend`] to create a convienient staging area for changes before they are
/// 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,
Expand Down

0 comments on commit 94a084a

Please sign in to comment.