Need conversion from ref too

This commit is contained in:
David Palm 2018-08-22 13:28:33 +02:00
parent 283b13f114
commit f94c73537f
1 changed files with 6 additions and 0 deletions

View File

@ -823,6 +823,12 @@ macro_rules! construct_uint {
}
}
impl<'a> From<&'a [u8; $n_words * 8]> for $name {
fn from(bytes: &[u8; $n_words * 8]) -> Self {
bytes[..].into()
}
}
impl Default for $name {
fn default() -> Self {
$name::zero()