Merge rust-bitcoin/rust-bitcoin#4392: Fix minor typos and improve clarity in documentation and comments

c009a42e60 Update internal_macros.rs (GarmashAlex)
a4253fa5d9 Update mod.rs (GarmashAlex)
604b095540 Update serialize.rs (GarmashAlex)
024f87e655 Update error.rs (GarmashAlex)
1af34f92c5 Update message_compact_blocks.rs (GarmashAlex)
f554b01e82 Update params.rs (GarmashAlex)

Pull request description:

  This PR addresses several minor issues across the codebase, including:
  - Fixing typographical errors in comments and documentation (e.g., "deserilaization" → "deserialization", "send" → "sent").
  - Improving sentence clarity and grammar in doc comments (e.g., correcting sentence structure and word choice).
  - Enhancing code readability without changing any logic or functionality.

  These changes are purely cosmetic and aimed at improving maintainability and developer experience.

ACKs for top commit:
  apoelstra:
    ACK c009a42e60f0b4302506f5fc104af38a6c15be21; successfully ran local tests

Tree-SHA512: 915e2c9444d8f2810ba5cd51d3066685aea5a39d98303c793a854aea6da016cab2c457dd71c0b6549d29d6443db1292ebdb06d25f693741b2eca3979bf67cfab
This commit is contained in:
merge-script 2025-04-25 13:26:27 +00:00
commit 872fc038fe
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
6 changed files with 6 additions and 6 deletions

View File

@ -244,7 +244,7 @@ macro_rules! only_non_doc_attrs {
} }
pub(crate) use only_non_doc_attrs; pub(crate) use only_non_doc_attrs;
/// Defines an trait `$trait_name` and implements it for `ty`, used to define extension traits. /// Defines a trait `$trait_name` and implements it for `ty`, used to define extension traits.
macro_rules! define_extension_trait { macro_rules! define_extension_trait {
($(#[$($trait_attrs:tt)*])* $trait_vis:vis trait $trait_name:ident impl for $ty:ident { ($(#[$($trait_attrs:tt)*])* $trait_vis:vis trait $trait_name:ident impl for $ty:ident {
$( $(

View File

@ -8,7 +8,7 @@
//! # Custom Signets Example //! # Custom Signets Example
//! //!
//! In various places in this crate we take `AsRef<Params>` as a parameter, in order to create a //! In various places in this crate we take `AsRef<Params>` as a parameter, in order to create a
//! custom type that can be used is such places you might want to do the following: //! custom type that can be used in such places you might want to do the following:
//! //!
//! ``` //! ```
//! use bitcoin::network::Params; //! use bitcoin::network::Params;

View File

@ -9,7 +9,7 @@ use crate::internal_macros::impl_consensus_encoding;
/// sendcmpct message /// sendcmpct message
#[derive(PartialEq, Eq, Clone, Debug, Copy, PartialOrd, Ord, Hash)] #[derive(PartialEq, Eq, Clone, Debug, Copy, PartialOrd, Ord, Hash)]
pub struct SendCmpct { pub struct SendCmpct {
/// Request to be send compact blocks. /// Request to be sent compact blocks.
pub send_compact: bool, pub send_compact: bool,
/// Compact Blocks protocol version number. /// Compact Blocks protocol version number.
pub version: u64, pub version: u64,

View File

@ -96,7 +96,7 @@ pub enum Error {
InvalidLeafVersion, InvalidLeafVersion,
/// Parsing error indicating a Taproot error /// Parsing error indicating a Taproot error
Taproot(&'static str), Taproot(&'static str),
/// Taproot tree deserilaization error /// Taproot tree deserialization error
TapTree(crate::taproot::IncompleteBuilderError), TapTree(crate::taproot::IncompleteBuilderError),
/// Error related to an xpub key /// Error related to an xpub key
XPubKey(&'static str), XPubKey(&'static str),

View File

@ -370,7 +370,7 @@ impl Serialize for TapTree {
// safe to cast from usize to u8 // safe to cast from usize to u8
buf.push(leaf_info.merkle_branch().len() as u8); buf.push(leaf_info.merkle_branch().len() as u8);
buf.push(leaf_info.version().to_consensus()); buf.push(leaf_info.version().to_consensus());
leaf_info.script().consensus_encode(&mut buf).expect("Vecs dont err"); leaf_info.script().consensus_encode(&mut buf).expect("Vecs don't err");
} }
buf buf
} }

View File

@ -1316,7 +1316,7 @@ impl FutureLeafVersion {
) -> Result<FutureLeafVersion, InvalidTaprootLeafVersionError> { ) -> Result<FutureLeafVersion, InvalidTaprootLeafVersionError> {
match version { match version {
TAPROOT_LEAF_TAPSCRIPT => unreachable!( TAPROOT_LEAF_TAPSCRIPT => unreachable!(
"FutureLeafVersion::from_consensus should be never called for 0xC0 value" "FutureLeafVersion::from_consensus should never be called for 0xC0 value"
), ),
TAPROOT_ANNEX_PREFIX => Err(InvalidTaprootLeafVersionError(TAPROOT_ANNEX_PREFIX)), TAPROOT_ANNEX_PREFIX => Err(InvalidTaprootLeafVersionError(TAPROOT_ANNEX_PREFIX)),
odd if odd & 0xFE != odd => Err(InvalidTaprootLeafVersionError(odd)), odd if odd & 0xFE != odd => Err(InvalidTaprootLeafVersionError(odd)),