90b4f1cde8 Clear TapTreeIter clippy warning (Tobin C. Harding)
e6084a1af8 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 90b4f1cde8
  sanket1729:
    ACK 90b4f1cde8

Tree-SHA512: 0647dc2e6550938ccca658a9dddffba7175d5c4eb8cec0e165d3a7fa8f2b1dfb902e795aca77d96a6c31092baf64244fa1d7151a304134d3b1895619a2823338
This commit is contained in:
sanket1729 2022-05-19 18:50:13 -07:00
commit d73a94a5d9
No known key found for this signature in database
GPG Key ID: 648FFB183E0870A2
2 changed files with 4 additions and 4 deletions

View File

@ -35,7 +35,7 @@ pub struct EcdsaSig {
}
impl EcdsaSig {
/// Constructs ECDSA bitcoin signature for [`EcdsaSighashType::All`]
/// Constructs an ECDSA bitcoin signature for [`EcdsaSighashType::All`].
pub fn sighash_all(sig: secp256k1::ecdsa::Signature) -> EcdsaSig {
EcdsaSig {
sig,
@ -43,7 +43,7 @@ impl EcdsaSig {
}
}
/// Deserialize from slice following the standardness rules for [`EcdsaSighashType`]
/// Deserializes from slice following the standardness rules for [`EcdsaSighashType`].
pub fn from_slice(sl: &[u8]) -> Result<Self, EcdsaSigError> {
let (hash_ty, sig) = sl.split_last()
.ok_or(EcdsaSigError::EmptySignature)?;
@ -54,7 +54,7 @@ impl EcdsaSig {
Ok(EcdsaSig { sig, hash_ty })
}
/// Serialize EcdsaSig
/// Serializes an ECDSA signature (inner secp256k1 signature in DER format).
pub fn to_vec(&self) -> Vec<u8> {
// TODO: add support to serialize to a writer to SerializedSig
self.sig.serialize_der()

View File

@ -168,7 +168,7 @@ impl TapTree {
self.0.clone()
}
/// Returns [`TapTreeIter`] iterator for a taproot script tree, operating in DFS order over
/// Returns [`TapTreeIter<'_>`] iterator for a taproot script tree, operating in DFS order over
/// tree [`ScriptLeaf`]s.
pub fn script_leaves(&self) -> TapTreeIter {
match (self.0.branch().len(), self.0.branch().last()) {