From e6084a1af8c6d192ffd2f3e3041d7c622c8bdef7 Mon Sep 17 00:00:00 2001 From: Tobin Harding Date: Fri, 7 Jan 2022 13:58:47 +1100 Subject: [PATCH] Improve documentation around EcdsaSig Improve the rustdocs for serialization methods of the `EcdsaSig` type. --- src/util/ecdsa.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/ecdsa.rs b/src/util/ecdsa.rs index 86c738e7..37a31649 100644 --- a/src/util/ecdsa.rs +++ b/src/util/ecdsa.rs @@ -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 { 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 { // TODO: add support to serialize to a writer to SerializedSig self.sig.serialize_der()