From 594100873399007f52789b8ba1d95d0280a8e05a Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Sat, 13 Jul 2024 07:33:21 +1000 Subject: [PATCH] Import sha256t in docs builds Explicitly import `sha256t` in docs builds and remove explicit link target. This patch is code churn on its own but the `sha256t` module will be used again in proceeding patches, done separately to reduce the size/complexity of proceeding patches. --- hashes/src/sha256.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hashes/src/sha256.rs b/hashes/src/sha256.rs index 76aa3627c..68fa277c7 100644 --- a/hashes/src/sha256.rs +++ b/hashes/src/sha256.rs @@ -10,6 +10,8 @@ use core::cmp; use core::ops::Index; use core::slice::SliceIndex; +#[cfg(doc)] +use crate::sha256t; use crate::{sha256d, FromSliceError, HashEngine as _}; crate::internal_macros::hash_type! { @@ -167,8 +169,8 @@ impl Midstate { /// /// Warning: this function is inefficient. It should be only used in `const` context. /// - /// Computes non-finalized hash of `sha256(tag) || sha256(tag)` for use in - /// [`sha256t`](super::sha256t). It's provided for use with [`sha256t`](crate::sha256t). + /// Computes non-finalized hash of `sha256(tag) || sha256(tag)` for use in [`sha256t`]. It's + /// provided for use with [`sha256t`]. pub const fn hash_tag(tag: &[u8]) -> Self { let hash = Hash::const_hash(tag); let mut buf = [0u8; 64];