Import with super::* in unit test

As is customary import using a wildcard. Includes `use Hash as _` to
remove naming conflict between the trait and type.
This commit is contained in:
Tobin C. Harding 2024-02-28 09:14:32 +11:00
parent f69417f8bc
commit e302e30e7c
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 5 additions and 6 deletions

View File

@ -817,7 +817,8 @@ impl HashEngine {
#[cfg(test)]
mod tests {
use crate::{sha256, Hash, HashEngine};
use crate::{sha256, Hash as _, HashEngine};
use super::*;
#[test]
#[cfg(feature = "alloc")]
@ -964,14 +965,14 @@ mod tests {
#[test]
fn const_hash() {
assert_eq!(super::Hash::hash(&[]), super::Hash::const_hash(&[]));
assert_eq!(Hash::hash(&[]), Hash::const_hash(&[]));
let mut bytes = Vec::new();
for i in 0..256 {
bytes.push(i as u8);
assert_eq!(
super::Hash::hash(&bytes),
super::Hash::const_hash(&bytes),
Hash::hash(&bytes),
Hash::const_hash(&bytes),
"hashes don't match for length {}",
i + 1
);
@ -980,8 +981,6 @@ mod tests {
#[test]
fn const_midstate() {
use super::Midstate;
assert_eq!(
Midstate::hash_tag(b"TapLeaf"),
Midstate([