pub fn address_from_strings(data: &str) -> Result<AccountAddress> {
    let account_vec: Vec<u8> = hex::decode(data.parse::<String>()?)?;

    let account = match AccountAddress::try_from(&account_vec[..]) {
        Ok(address) => address,
        Err(error) => bail!(
            "The address {:?} is invalid, error: {:?}",
            &account_vec,
            error,
        ),
    };

    Ok(account)
}
/// Converts hex representation of an address into binary.
Converts hex representation of an address into binary.
Converts hex representation of an address into binary .
pub fn address_from_strings(data: &str) -> Result<AccountAddress> {
    let account_vec: Vec<u8> = hex::decode(data.parse::<String>()?)?;
    let account = match AccountAddress::try_from(&account_vec[..]) {
        Ok(address) => address,
        Err(error) => bail!(
            "The address {:?} is invalid, error: {:?}",
            &account_vec,
            error,
        ),
    };
    Ok(account)
}
pub fn address_from_strings ( data : & str ) -> Result < AccountAddress > { let account_vec : Vec < u8 > = hex :: decode ( data . parse :: < String > ( ) ? ) ? ; let account = match AccountAddress :: try_from ( & account_vec [ .. ] ) { Ok ( address ) => address , Err ( error ) => bail ! ( " " account_vec error ) , } ; Ok ( account ) }
Converts hex representation of an address into binary.
Converts hex representation of an address into binary .
data
&str
data
&str