diff --git a/Cargo.toml b/Cargo.toml index c21b523..3b6b852 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ homepage = "http://ethcore.io" repository = "https://github.com/ethcore/parity" license = "GPL-3.0" name = "ethcore-bigint" -version = "0.1.1" +version = "0.1.2" authors = ["Ethcore "] build = "build.rs" diff --git a/src/hash.rs b/src/hash.rs index f782d1f..20cdbae 100644 --- a/src/hash.rs +++ b/src/hash.rs @@ -386,6 +386,12 @@ macro_rules! impl_hash { } } } + + impl<'a> From<&'a [u8]> for $from { + fn from(s: &'a [u8]) -> $from { + $from::from_slice(s) + } + } } }