hashes: Adjust hash newtype doc comments
What changed, and why it matters
This commit only fixes the wording and formatting of documentation comments in four source files. It adds backticks around hash function names like `SHA256d` and `SipHash24` so the generated documentation looks consistent. No code behavior changes.
No security action needed; this is a documentation-style commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff is a pure documentation-comment cleanup in rust-bitcoin’s hashes crate. It changes four #[doc = ...]//// lines in muhash/mod.rs, sha256d/mod.rs, sha256t/mod.rs, and siphash24/mod.rs to put hash function names in backticks and, in one case, switch from an attribute-style doc to a regular doc comment. There are no functional code, type, macro, or API changes.
Changed components
hashes/src/muhash/mod.rshashes/src/sha256d/mod.rshashes/src/sha256t/mod.rshashes/src/siphash24/mod.rsInspect captured patch +4 / −4
diff --git a/hashes/src/muhash/mod.rs b/hashes/src/muhash/mod.rs
index a8ebc3ba..0e07abb6 100644
--- a/hashes/src/muhash/mod.rs
+++ b/hashes/src/muhash/mod.rs
@@ -12,7 +12,7 @@ const BYTE_SIZE: usize = 384;
// This code is the exact same as calling `hash_type_no_default!` but excludes call to `impl_write`.
internals::transparent_newtype! {
- #[doc = "Output of the MuHash3072 hash function."]
+ /// Output of the `MuHash3072` hash function.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Hash([u8; BYTE_SIZE]);
diff --git a/hashes/src/sha256d/mod.rs b/hashes/src/sha256d/mod.rs
index 80fe389d..9f412c0a 100644
--- a/hashes/src/sha256d/mod.rs
+++ b/hashes/src/sha256d/mod.rs
@@ -5,7 +5,7 @@
use crate::sha256;
crate::internal_macros::general_hash_type! {
- /// Output of the SHA256d hash function.
+ /// Output of the `SHA256d` hash function.
pub struct Hash([u8; 32]);
const DISPLAY_BACKWARD: bool = true;
diff --git a/hashes/src/sha256t/mod.rs b/hashes/src/sha256t/mod.rs
index 44cf4540..303ec9a8 100644
--- a/hashes/src/sha256t/mod.rs
+++ b/hashes/src/sha256t/mod.rs
@@ -44,7 +44,7 @@ pub trait Tag {
}
internals::transparent_newtype! {
- /// Output of the SHA256t hash function.
+ /// Output of the `SHA256t` hash function.
pub struct Hash<T>(PhantomData<T>, [u8; 32]);
impl<T> Hash<T> {
diff --git a/hashes/src/siphash24/mod.rs b/hashes/src/siphash24/mod.rs
index 495f8650..3f08e5d7 100644
--- a/hashes/src/siphash24/mod.rs
+++ b/hashes/src/siphash24/mod.rs
@@ -9,7 +9,7 @@ use core::{cmp, mem};
use crate::HashEngine as _;
crate::internal_macros::hash_type_no_default! {
- /// Output of the SipHash24 hash function.
+ /// Output of the `SipHash24` hash function.
pub struct Hash([u8; 8]);
const DISPLAY_BACKWARD: bool = false;
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.