Skip to content

Commit 7fcec28

Browse files
author
ChallengeDev210
committed
Merge rust-bitcoin/rust-bitcoin#960: Trival docs fixes
90b4f1c Clear TapTreeIter clippy warning (Tobin C. Harding) e6084a1 Improve documentation around EcdsaSig (Tobin Harding) Pull request description: Do a couple of trivial docs fixes, done during other work. - Patch 1 improves docs on the `EcdsaSig` struct - Patch 2 clears a clippy warning during docs build - no sure if the solution is the best available though ACKs for top commit: apoelstra: re-ACK 90b4f1c sanket1729: ACK 90b4f1c Tree-SHA512: 0647dc2e6550938ccca658a9dddffba7175d5c4eb8cec0e165d3a7fa8f2b1dfb902e795aca77d96a6c31092baf64244fa1d7151a304134d3b1895619a2823338
2 parents 598c937 + 448307e commit 7fcec28

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/util/ecdsa.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ pub struct EcdsaSig {
3535
}
3636

3737
impl EcdsaSig {
38-
/// Constructs ECDSA bitcoin signature for [`EcdsaSighashType::All`]
38+
/// Constructs an ECDSA bitcoin signature for [`EcdsaSighashType::All`].
3939
pub fn sighash_all(sig: secp256k1::ecdsa::Signature) -> EcdsaSig {
4040
EcdsaSig {
4141
sig,
4242
hash_ty: EcdsaSighashType::All
4343
}
4444
}
4545

46-
/// Deserialize from slice following the standardness rules for [`EcdsaSighashType`]
46+
/// Deserializes from slice following the standardness rules for [`EcdsaSighashType`].
4747
pub fn from_slice(sl: &[u8]) -> Result<Self, EcdsaSigError> {
4848
let (hash_ty, sig) = sl.split_last()
4949
.ok_or(EcdsaSigError::EmptySignature)?;
@@ -54,7 +54,7 @@ impl EcdsaSig {
5454
Ok(EcdsaSig { sig, hash_ty })
5555
}
5656

57-
/// Serialize EcdsaSig
57+
/// Serializes an ECDSA signature (inner secp256k1 signature in DER format).
5858
pub fn to_vec(&self) -> Vec<u8> {
5959
// TODO: add support to serialize to a writer to SerializedSig
6060
self.sig.serialize_der()

src/util/psbt/map/output.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl TapTree {
168168
self.0.clone()
169169
}
170170

171-
/// Returns [`TapTreeIter`] iterator for a taproot script tree, operating in DFS order over
171+
/// Returns [`TapTreeIter<'_>`] iterator for a taproot script tree, operating in DFS order over
172172
/// tree [`ScriptLeaf`]s.
173173
pub fn script_leaves(&self) -> TapTreeIter {
174174
match (self.0.branch().len(), self.0.branch().last()) {

0 commit comments

Comments
 (0)