From 47ac342056f77707e3bf845aaae65f9ede0af6aa Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 25 Apr 2024 10:53:56 +1000 Subject: [PATCH] docs: Make rustdoc imports more terse Make the rustdoc imports in `hashes/src/lib.rs` more terse and also use as-underscore. --- hashes/src/lib.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hashes/src/lib.rs b/hashes/src/lib.rs index 9a83afa0..3bfdbf62 100644 --- a/hashes/src/lib.rs +++ b/hashes/src/lib.rs @@ -12,8 +12,7 @@ //! Hashing a single byte slice or a string: //! //! ```rust -//! use bitcoin_hashes::sha256; -//! use bitcoin_hashes::Hash; +//! use bitcoin_hashes::{sha256, Hash as _}; //! //! let bytes = [0u8; 5]; //! let hash_of_bytes = sha256::Hash::hash(&bytes); @@ -24,8 +23,7 @@ //! Hashing content from a reader: //! //! ```rust -//! use bitcoin_hashes::sha256; -//! use bitcoin_hashes::Hash; +//! use bitcoin_hashes::{sha256, Hash as _}; //! //! #[cfg(std)] //! # fn main() -> std::io::Result<()> { @@ -44,8 +42,7 @@ //! Hashing content by [`std::io::Write`] on HashEngine: //! //! ```rust -//! use bitcoin_hashes::sha256; -//! use bitcoin_hashes::Hash; +//! use bitcoin_hashes::{sha256, Hash as _}; //! use std::io::Write; //! //! #[cfg(std)]