diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-05-24 15:02:01 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-05-30 12:09:46 +0200 |
commit | bb58a798df43affe2297388576fec0216b9cef3a (patch) | |
tree | e482f19048c1fe02525d4e7e1c4f8d6571ba5ff7 /openpgp/src/keyid.rs | |
parent | 97f9072481bd68a881f1a7579ff829130f010e44 (diff) |
openpgp: Implement From<u64> for KeyID.
Diffstat (limited to 'openpgp/src/keyid.rs')
-rw-r--r-- | openpgp/src/keyid.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/openpgp/src/keyid.rs b/openpgp/src/keyid.rs index 40842146..936729a5 100644 --- a/openpgp/src/keyid.rs +++ b/openpgp/src/keyid.rs @@ -31,6 +31,12 @@ impl From<KeyID> for Vec<u8> { } } +impl From<u64> for KeyID { + fn from(id: u64) -> Self { + Self::new(id) + } +} + impl KeyID { /// Converts a u64 to a KeyID. pub fn new(data: u64) -> KeyID { |