diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2018-12-14 10:23:55 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2018-12-14 10:36:27 +0100 |
commit | d15256a6745ff53853312f0b0f51ba1dbae7ca44 (patch) | |
tree | bd12ac60593f9285760078bb7aaf67940a1507b2 /openpgp/src/keyid.rs | |
parent | 8379acbea8dff1e94a7bc97727bf337e2f06c444 (diff) |
openpgp: Implement Arbitrary for KeyID.
Diffstat (limited to 'openpgp/src/keyid.rs')
-rw-r--r-- | openpgp/src/keyid.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/openpgp/src/keyid.rs b/openpgp/src/keyid.rs index f55fe336..40842146 100644 --- a/openpgp/src/keyid.rs +++ b/openpgp/src/keyid.rs @@ -1,4 +1,5 @@ use std::fmt; +use quickcheck::{Arbitrary, Gen}; use Error; use Fingerprint; @@ -167,6 +168,12 @@ impl KeyID { } } +impl Arbitrary for KeyID { + fn arbitrary<G: Gen>(g: &mut G) -> Self { + KeyID::new(u64::arbitrary(g)) + } +} + #[cfg(test)] mod test { use super::*; |