pub fn from_hex(hex: impl AsRef<[u8]>) -> Result<Self> {
        let hex = hex.as_ref();
        Ok(GitHash(hex::FromHex::from_hex(hex).map_err(|err| {
            SystemError::from_hex(format!("parsing a Git hash: {:?}", hex), err)
        })?))
    }
/// Creates a new Git hash from a hex-encoded string.
Creates a new Git hash from a hex-encoded string.
Creates a new Git hash from a hex - encoded string .
pub fn from_hex(hex: impl AsRef<[u8]>) -> Result<Self> {
        let hex = hex.as_ref();
        Ok(GitHash(hex::FromHex::from_hex(hex).map_err(|err| {
            SystemError::from_hex(format!("parsing a Git hash: {:?}", hex), err)
        })?))
    }
pub fn from_hex ( hex : impl AsRef < [ u8 ] > ) -> Result < Self > { let hex = hex . as_ref ( ) ; Ok ( GitHash ( hex :: FromHex :: from_hex ( hex ) . map_err ( | err | { SystemError :: from_hex ( format ! ( " " hex ) , err ) } ) ? ) ) }
Creates a new Git hash from a hex-encoded string.
Creates a new Git hash from a hex - encoded string .
hex
impl AsRef<[u8]>