From 92059c2841ef038444f6d4682c6124ef44560c93 Mon Sep 17 00:00:00 2001 From: Tobin Harding Date: Wed, 5 Jan 2022 10:26:58 +1100 Subject: [PATCH] Add full stops to rustdocs Mildly improve the docs by adding full stops to every rustdoc comment. --- src/util/psbt/map/input.rs | 20 ++++++++++---------- src/util/psbt/map/mod.rs | 2 +- src/util/psbt/map/output.rs | 10 +++++----- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/util/psbt/map/input.rs b/src/util/psbt/map/input.rs index ae451b1a..45222b59 100644 --- a/src/util/psbt/map/input.rs +++ b/src/util/psbt/map/input.rs @@ -108,32 +108,32 @@ pub struct Input { /// other scripts necessary for this input to pass validation. pub final_script_witness: Option, /// TODO: Proof of reserves commitment - /// RIPEMD160 hash to preimage map + /// RIPEMD160 hash to preimage map. #[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_byte_values"))] pub ripemd160_preimages: BTreeMap>, - /// SHA256 hash to preimage map + /// SHA256 hash to preimage map. #[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_byte_values"))] pub sha256_preimages: BTreeMap>, - /// HSAH160 hash to preimage map + /// HSAH160 hash to preimage map. #[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_byte_values"))] pub hash160_preimages: BTreeMap>, - /// HAS256 hash to preimage map + /// HAS256 hash to preimage map. #[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_byte_values"))] pub hash256_preimages: BTreeMap>, - /// Serialized schnorr signature with sighash type for key spend + /// Serialized schnorr signature with sighash type for key spend. pub tap_key_sig: Option, - /// Map of | with signature + /// Map of | with signature. #[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_as_seq"))] pub tap_script_sigs: BTreeMap<(XOnlyPublicKey, TapLeafHash), SchnorrSig>, - /// Map of Control blocks to Script version pair + /// Map of Control blocks to Script version pair. #[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_as_seq"))] pub tap_scripts: BTreeMap, - /// Map of tap root x only keys to origin info and leaf hashes contained in it + /// Map of tap root x only keys to origin info and leaf hashes contained in it. #[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_as_seq"))] pub tap_key_origins: BTreeMap, KeySource)>, - /// Taproot Internal key + /// Taproot Internal key. pub tap_internal_key : Option, - /// Taproot Merkle root + /// Taproot Merkle root. pub tap_merkle_root : Option, /// Proprietary key-value pairs for this input. #[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_as_seq_byte_values"))] diff --git a/src/util/psbt/map/mod.rs b/src/util/psbt/map/mod.rs index a2a58d71..ee323926 100644 --- a/src/util/psbt/map/mod.rs +++ b/src/util/psbt/map/mod.rs @@ -38,7 +38,7 @@ pub trait Map { /// Attempt to merge with another key-value map of the same type. fn merge(&mut self, other: Self) -> Result<(), psbt::Error>; - /// Encodes map data with bitcoin consensus encoding + /// Encodes map data with bitcoin consensus encoding. fn consensus_encode_map( &self, mut s: S, diff --git a/src/util/psbt/map/output.rs b/src/util/psbt/map/output.rs index a0ef044d..7fe392e2 100644 --- a/src/util/psbt/map/output.rs +++ b/src/util/psbt/map/output.rs @@ -58,11 +58,11 @@ pub struct Output { /// corresponding master key fingerprints and derivation paths. #[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_as_seq"))] pub bip32_derivation: BTreeMap, - /// The internal pubkey + /// The internal pubkey. pub tap_internal_key: Option, - /// Taproot Output tree + /// Taproot Output tree. pub tap_tree: Option, - /// Map of tap root x only keys to origin info and leaf hashes contained in it + /// Map of tap root x only keys to origin info and leaf hashes contained in it. #[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_as_seq"))] pub tap_key_origins: BTreeMap, KeySource)>, /// Proprietary key-value pairs for this output. @@ -79,7 +79,7 @@ pub struct Output { pub unknown: BTreeMap>, } -/// Taproot Tree representing a finalized [`TaprootBuilder`] (a complete binary tree) +/// Taproot Tree representing a finalized [`TaprootBuilder`] (a complete binary tree). #[derive(Clone, Debug)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub struct TapTree(pub(crate) TaprootBuilder); @@ -103,7 +103,7 @@ impl TapTree { } /// Convert a [`TaprootBuilder`] into a tree if it is complete binary tree. - /// Returns the inner as Err if it is not a complete tree + /// Returns the inner as Err if it is not a complete tree. pub fn from_inner(inner: TaprootBuilder) -> Result { if inner.is_complete() { Ok(TapTree(inner))