Use Into in Hash::result() instead of TryFrom (#29721)
This commit is contained in:
parent
8a28877910
commit
da39c4837f
|
@ -61,9 +61,7 @@ impl Hasher {
|
|||
}
|
||||
}
|
||||
pub fn result(self) -> Hash {
|
||||
// At the time of this writing, the sha2 library is stuck on an old version
|
||||
// of generic_array (0.9.0). Decouple ourselves with a clone to our version.
|
||||
Hash(<[u8; HASH_BYTES]>::try_from(self.hasher.finalize().as_slice()).unwrap())
|
||||
Hash(self.hasher.finalize().into())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue