What changed, and why it matters
This commit only changes documentation wording in source code comments, replacing the word 'Creates' with 'Constructs' across 13 files to match the project's style policy. No program logic, behavior, or security properties were modified.
No action required. This is a non-functional documentation style cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff is a pure documentation/style patch. Every change is inside rustdoc comments (///) or regular comments (//) and simply substitutes ‘Creates’ with ‘Constructs’. No executable code, function signatures, macros, tests, or APIs were altered. There is no security-relevant change.
Changed components
Inspect captured patch +19 / −19
diff --git a/bitcoin/src/blockdata/transaction.rs b/bitcoin/src/blockdata/transaction.rs
index 999696b7..42726ca1 100644
--- a/bitcoin/src/blockdata/transaction.rs
+++ b/bitcoin/src/blockdata/transaction.rs
@@ -1160,7 +1160,7 @@ internals::transparent_newtype! {
pub struct Coinbase(Transaction);
impl Coinbase {
- /// Creates a reference to `Coinbase` from a reference to the inner `Transaction`.
+ /// Constructs a reference to `Coinbase` from a reference to the inner `Transaction`.
///
/// This method does not validate that the transaction is actually a coinbase transaction.
/// The caller must ensure that the transaction is indeed a valid coinbase transaction
@@ -1169,7 +1169,7 @@ internals::transparent_newtype! {
}
impl Coinbase {
- /// Creates a `Coinbase` wrapper assuming this transaction is a coinbase transaction.
+ /// Constructs a `Coinbase` wrapper assuming this transaction is a coinbase transaction.
///
/// This method does not validate that the transaction is actually a coinbase transaction.
/// The caller must ensure that this transaction is indeed a valid coinbase transaction.
diff --git a/bitcoin/src/crypto/key.rs b/bitcoin/src/crypto/key.rs
index b20c76a0..c2267c80 100644
--- a/bitcoin/src/crypto/key.rs
+++ b/bitcoin/src/crypto/key.rs
@@ -41,7 +41,7 @@ impl XOnlyPublicKey {
XOnlyPublicKey(key.into())
}
- /// Creates an x-only public key from a keypair.
+ /// Constructs an x-only public key from a keypair.
///
/// Returns the x-only public key and the parity of the full public key.
#[inline]
@@ -50,7 +50,7 @@ impl XOnlyPublicKey {
(XOnlyPublicKey::new(xonly), parity)
}
- /// Creates an x-only public key from a 32-byte x-coordinate.
+ /// Constructs an x-only public key from a 32-byte x-coordinate.
///
/// Returns an error if the provided bytes don't represent a valid secp256k1 point x-coordinate.
#[inline]
diff --git a/bitcoin/src/network/params.rs b/bitcoin/src/network/params.rs
index 645c16ee..4865eb5d 100644
--- a/bitcoin/src/network/params.rs
+++ b/bitcoin/src/network/params.rs
@@ -240,7 +240,7 @@ impl Params {
no_pow_retargeting: true,
};
- /// Creates parameters set for the given network.
+ /// Constructs parameters set for the given network.
pub const fn new(network: Network) -> Self {
match network {
Network::Bitcoin => Params::MAINNET,
diff --git a/bitcoin/src/pow.rs b/bitcoin/src/pow.rs
index 6aeb3b48..8a50cd57 100644
--- a/bitcoin/src/pow.rs
+++ b/bitcoin/src/pow.rs
@@ -25,27 +25,27 @@ pub use primitives::CompactTarget;
macro_rules! do_impl {
($ty:ident) => {
impl $ty {
- #[doc = "Creates `"]
+ #[doc = "Constructs `"]
#[doc = stringify!($ty)]
#[doc = "` from a prefixed hex string."]
pub fn from_hex(s: &str) -> Result<Self, PrefixedHexError> {
Ok($ty(U256::from_hex(s)?))
}
- #[doc = "Creates `"]
+ #[doc = "Constructs `"]
#[doc = stringify!($ty)]
#[doc = "` from an unprefixed hex string."]
pub fn from_unprefixed_hex(s: &str) -> Result<Self, UnprefixedHexError> {
Ok($ty(U256::from_unprefixed_hex(s)?))
}
- #[doc = "Creates `"]
+ #[doc = "Constructs `"]
#[doc = stringify!($ty)]
#[doc = "` from a big-endian byte array."]
#[inline]
pub fn from_be_bytes(bytes: [u8; 32]) -> $ty { $ty(U256::from_be_bytes(bytes)) }
- #[doc = "Creates `"]
+ #[doc = "Constructs `"]
#[doc = stringify!($ty)]
#[doc = "` from a little-endian byte array."]
#[inline]
diff --git a/bitcoin/src/taproot/merkle_branch/borrowed.rs b/bitcoin/src/taproot/merkle_branch/borrowed.rs
index 85a839db..d28af7b5 100644
--- a/bitcoin/src/taproot/merkle_branch/borrowed.rs
+++ b/bitcoin/src/taproot/merkle_branch/borrowed.rs
@@ -46,11 +46,11 @@ impl TaprootMerkleBranch {
#[inline]
pub fn is_empty(&self) -> bool { self.as_slice().is_empty() }
- /// Creates an iterator over the node hashes.
+ /// Constructs an iterator over the node hashes.
#[inline]
pub fn iter(&self) -> core::slice::Iter<'_, TapNodeHash> { self.into_iter() }
- /// Creates an iterator over the mutable node hashes.
+ /// Constructs an iterator over the mutable node hashes.
#[inline]
pub fn iter_mut(&mut self) -> core::slice::IterMut<'_, TapNodeHash> { self.into_iter() }
diff --git a/bitcoin/src/taproot/mod.rs b/bitcoin/src/taproot/mod.rs
index 5c284ce8..a4a050b3 100644
--- a/bitcoin/src/taproot/mod.rs
+++ b/bitcoin/src/taproot/mod.rs
@@ -952,7 +952,7 @@ impl NodeInfo {
})
}
- /// Creates an iterator over all leaves (including hidden leaves) in the tree.
+ /// Constructs an iterator over all leaves (including hidden leaves) in the tree.
pub fn leaf_nodes(&self) -> LeafNodes<'_> { LeafNodes { leaf_iter: self.leaves.iter() } }
/// Returns the root [`TapNodeHash`] of this node info.
diff --git a/hashes/src/internal_macros.rs b/hashes/src/internal_macros.rs
index 998db6b2..21f37dca 100644
--- a/hashes/src/internal_macros.rs
+++ b/hashes/src/internal_macros.rs
@@ -48,7 +48,7 @@ macro_rules! hash_trait_impls {
}
pub(crate) use hash_trait_impls;
-/// Creates a type called `Hash` and implements the standard general hashing interface for it.
+/// Constructs a type called `Hash` and implements the standard general hashing interface for it.
///
/// The created type has a single field and will have all standard derives as well as an
/// implementation of [`crate::Hash`].
diff --git a/hashes/src/macros.rs b/hashes/src/macros.rs
index 654206f8..d45ebbc5 100644
--- a/hashes/src/macros.rs
+++ b/hashes/src/macros.rs
@@ -38,7 +38,7 @@ macro_rules! sha256t_tag {
}
}
-/// Creates a new newtype around a [`Hash`] type.
+/// Constructs a new newtype around a [`Hash`] type.
///
/// The syntax is similar to the usual tuple struct syntax:
///
diff --git a/internals/src/error/parse_error.rs b/internals/src/error/parse_error.rs
index 542f197c..b81954a4 100644
--- a/internals/src/error/parse_error.rs
+++ b/internals/src/error/parse_error.rs
@@ -1,6 +1,6 @@
//! Contains helpers for parsing-related errors.
-/// Creates an error type intended for string parsing errors.
+/// Constructs an error type intended for string parsing errors.
///
/// The resulting error type has two fields: `input` and `source`. The type of `input` is
/// [`InputString`](super::InputString), the type of `source` is specified as the second argument
diff --git a/internals/src/macros.rs b/internals/src/macros.rs
index ce0d412b..56a3aeb8 100644
--- a/internals/src/macros.rs
+++ b/internals/src/macros.rs
@@ -38,7 +38,7 @@ macro_rules! impl_to_hex_from_lower_hex {
};
}
-/// Creates a transparent wrapper around an inner type and soundly implements reference casts.
+/// Constructs a transparent wrapper around an inner type and soundly implements reference casts.
///
/// This macro takes care of several issues related to newtypes that need to allow casting their
/// inner types to themselves:
diff --git a/io/tests/api.rs b/io/tests/api.rs
index 0267dc17..bb50e30c 100644
--- a/io/tests/api.rs
+++ b/io/tests/api.rs
@@ -25,7 +25,7 @@ struct Enums {
}
impl Enums {
- /// Creates an arbitrary `Enums` instance.
+ /// Constructs an arbitrary `Enums` instance.
fn new() -> Self { Self { a: ERROR_KIND } }
}
diff --git a/units/src/amount/tests.rs b/units/src/amount/tests.rs
index b2a3993c..3c769223 100644
--- a/units/src/amount/tests.rs
+++ b/units/src/amount/tests.rs
@@ -486,7 +486,7 @@ fn test_repeat_char() {
assert!(buf.chars().all(|c| c == '0'));
}
-// Creates individual test functions to make it easier to find which check failed.
+// Constructs individual test functions to make it easier to find which check failed.
macro_rules! check_format_non_negative {
($denom:ident; $($test_name:ident, $val:literal, $format_string:literal, $expected:literal);* $(;)?) => {
$(
diff --git a/units/src/result.rs b/units/src/result.rs
index 67c5b051..91e9260c 100644
--- a/units/src/result.rs
+++ b/units/src/result.rs
@@ -242,7 +242,7 @@ impl_opt_ext!(Amount, SignedAmount, u64, i64, FeeRate, Weight);
pub struct NumOpError(MathOp);
impl NumOpError {
- /// Creates a [`NumOpError`] caused by `op`.
+ /// Constructs a [`NumOpError`] caused by `op`.
pub(crate) const fn while_doing(op: MathOp) -> Self { NumOpError(op) }
/// Returns `true` if this operation error'ed due to overflow.
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.