thiserror, docs, remove general Failure case (#9741)

automerge
This commit is contained in:
anatoly yakovenko
2020-04-29 18:12:51 -07:00
committed by GitHub
parent 230df0ec0c
commit a0514eb2ae
8 changed files with 54 additions and 26 deletions

View File

@@ -1,5 +1,6 @@
//! The `hash` module provides functions for creating SHA-256 hashes.
use crate::sanitize::Sanitize;
use sha2::{Digest, Sha256};
use std::{convert::TryFrom, fmt, mem, str::FromStr};
use thiserror::Error;
@@ -30,6 +31,8 @@ impl Hasher {
}
}
impl Sanitize for Hash {}
impl AsRef<[u8]> for Hash {
fn as_ref(&self) -> &[u8] {
&self.0[..]