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.
This commit is contained in:
Tobin C. Harding 2024-07-13 07:33:21 +10:00
parent 59c806996c
commit 5941008733
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 4 additions and 2 deletions

View File

@ -10,6 +10,8 @@ use core::cmp;
use core::ops::Index; use core::ops::Index;
use core::slice::SliceIndex; use core::slice::SliceIndex;
#[cfg(doc)]
use crate::sha256t;
use crate::{sha256d, FromSliceError, HashEngine as _}; use crate::{sha256d, FromSliceError, HashEngine as _};
crate::internal_macros::hash_type! { crate::internal_macros::hash_type! {
@ -167,8 +169,8 @@ impl Midstate {
/// ///
/// Warning: this function is inefficient. It should be only used in `const` context. /// 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 /// Computes non-finalized hash of `sha256(tag) || sha256(tag)` for use in [`sha256t`]. It's
/// [`sha256t`](super::sha256t). It's provided for use with [`sha256t`](crate::sha256t). /// provided for use with [`sha256t`].
pub const fn hash_tag(tag: &[u8]) -> Self { pub const fn hash_tag(tag: &[u8]) -> Self {
let hash = Hash::const_hash(tag); let hash = Hash::const_hash(tag);
let mut buf = [0u8; 64]; let mut buf = [0u8; 64];