Skip to content

Commit b5cdcf5

Browse files
committed
fix cargo doc links and warnings
1 parent e767515 commit b5cdcf5

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/miniscript/decode.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ enum NonTerm {
6161
EndIfElse,
6262
}
6363
/// All AST elements
64+
#[allow(broken_intra_doc_links)]
6465
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6566
pub enum Terminal<Pk: MiniscriptKey, Ctx: ScriptContext> {
6667
/// `1`

src/miniscript/iter.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl<Pk: MiniscriptKey, Ctx: ScriptContext> Miniscript<Pk, Ctx> {
116116
/// if any. Otherwise returns an empty `Vec`.
117117
///
118118
/// NB: The function analyzes only single miniscript item and not any of its descendants in AST.
119-
/// To obtain a list of all public keys within AST use [`iter_pk()`] function, for example
119+
/// To obtain a list of all public keys within AST use [fn.iter_pk()] function, for example
120120
/// `miniscript.iter_pubkeys().collect()`.
121121
pub fn get_leaf_pk(&self) -> Vec<Pk> {
122122
match self.node {
@@ -133,7 +133,7 @@ impl<Pk: MiniscriptKey, Ctx: ScriptContext> Miniscript<Pk, Ctx> {
133133
/// returns its cloned copy.
134134
///
135135
/// NB: The function analyzes only single miniscript item and not any of its descendants in AST.
136-
/// To obtain a list of all public key hashes within AST use [`iter_pkh()`] function,
136+
/// To obtain a list of all public key hashes within AST use [fn.iter_pkh()] function,
137137
/// for example `miniscript.iter_pubkey_hashes().collect()`.
138138
pub fn get_leaf_pkh(&self) -> Vec<Pk::Hash> {
139139
match self.node {
@@ -149,7 +149,7 @@ impl<Pk: MiniscriptKey, Ctx: ScriptContext> Miniscript<Pk, Ctx> {
149149
/// keys or hashes, the function returns an empty `Vec`.
150150
///
151151
/// NB: The function analyzes only single miniscript item and not any of its descendants in AST.
152-
/// To obtain a list of all public keys or hashes within AST use [`iter_pk_pkh()`]
152+
/// To obtain a list of all public keys or hashes within AST use [fn.iter_pk_pkh()]
153153
/// function, for example `miniscript.iter_pubkeys_and_hashes().collect()`.
154154
pub fn get_leaf_pk_pkh(&self) -> Vec<PkPkh<Pk>> {
155155
match self.node {
@@ -364,7 +364,7 @@ pub enum PkPkh<Pk: MiniscriptKey> {
364364

365365
/// Iterator for traversing all [MiniscriptKey]'s and hashes, depending what data are present in AST,
366366
/// starting from some specific node which constructs the iterator via
367-
/// [Miniscript::iter_keys_and_hashes] method.
367+
/// [fn.Miniscript::iter_keys_and_hashes()] method.
368368
pub struct PkPkhIter<'a, Pk: 'a + MiniscriptKey, Ctx: 'a + ScriptContext> {
369369
node_iter: Iter<'a, Pk, Ctx>,
370370
curr_node: Option<&'a Miniscript<Pk, Ctx>>,
@@ -390,7 +390,7 @@ impl<'a, Pk: MiniscriptKey, Ctx: ScriptContext> PkPkhIter<'a, Pk, Ctx> {
390390
/// * Differs from `Miniscript::iter_pubkeys_and_hashes().collect()` in the way that it lists
391391
/// only public keys, and not their hashes
392392
///
393-
/// Unlike these functions, [pk_only()] returns an `Option` value with `Vec`, not an iterator,
393+
/// Unlike these functions, [fn.pk_only] returns an `Option` value with `Vec`, not an iterator,
394394
/// and consumes the iterator object.
395395
pub fn pk_only(self) -> Option<Vec<Pk>> {
396396
let mut keys = vec![];

0 commit comments

Comments
 (0)