Merge pull request #13 from petertodd/2017-05-08-from-impl-for-message

Implement From<[u8;32]> for Message
This commit is contained in:
Andrew Poelstra 2017-05-08 11:21:10 +00:00 committed by GitHub
commit bba4527af0
1 changed files with 7 additions and 0 deletions

View File

@ -302,6 +302,13 @@ impl Message {
}
}
/// Creates a message from a `MESSAGE_SIZE` byte array
impl From<[u8; constants::MESSAGE_SIZE]> for Message {
fn from(buf: [u8; constants::MESSAGE_SIZE]) -> Message {
Message(buf)
}
}
/// An ECDSA error
#[derive(Copy, PartialEq, Eq, Clone, Debug)]
pub enum Error {