Hide serde_details and debug_hex from docs
What changed, and why it matters
This commit only hides two internal helper items from the public API documentation. It does not change any code behavior, access permissions, or security boundaries. There is no security issue here.
No action needed. This is a non-security documentation change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit adds #[doc(hidden)] to the debug_hex helper function and the serde_details module in rust-bitcoin’s hashes crate. These items remain public so that macros and serde implementations can use them, but they are no longer shown in generated rustdoc output. This is a documentation/API-guideline conformance change only; no logic, visibility, or unsafe code is modified.
Changed components
hashes/src/lib.rshashes/src/macros.rsInspect captured patch +2 / −0
diff --git a/hashes/src/lib.rs b/hashes/src/lib.rs
index 6ba64e02..4d7839cf 100644
--- a/hashes/src/lib.rs
+++ b/hashes/src/lib.rs
@@ -292,6 +292,7 @@ fn incomplete_block_len<H: HashEngine>(eng: &H) -> usize {
/// # Errors
///
/// Returns an error if writing to the formatter fails.
+#[doc(hidden)]
pub fn debug_hex<'a>(
bytes: impl IntoIterator<Item = &'a u8>,
f: &mut fmt::Formatter,
diff --git a/hashes/src/macros.rs b/hashes/src/macros.rs
index 489f9dd0..17f56528 100644
--- a/hashes/src/macros.rs
+++ b/hashes/src/macros.rs
@@ -438,6 +438,7 @@ macro_rules! hash_newtype_known_attrs {
/// Functions used by serde impls of all hashes.
#[cfg(feature = "serde")]
+#[doc(hidden)]
pub mod serde_details {
use core::marker::PhantomData;
use core::str::FromStr;
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.