summaryrefslogtreecommitdiffstats
path: root/openpgp/src/keyid.rs
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2020-12-04 20:06:17 +0100
committerAzul <azul@riseup.net>2020-12-08 10:35:58 +0100
commitb956d36cb50cac28aa9da0e373fb33c9a4c120af (patch)
treec20bb42230aed97494b6abe494bc8e22053f58a6 /openpgp/src/keyid.rs
parent4a971af5abe70d41485df141a3d9fa97eaab5f1c (diff)
openpgp: Ensure public types are Send and Sync.
- See #627.
Diffstat (limited to 'openpgp/src/keyid.rs')
-rw-r--r--openpgp/src/keyid.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/openpgp/src/keyid.rs b/openpgp/src/keyid.rs
index 973b059e..3e7f38cc 100644
--- a/openpgp/src/keyid.rs
+++ b/openpgp/src/keyid.rs
@@ -65,6 +65,7 @@ pub enum KeyID {
/// e.g. wrong number of bytes.
Invalid(Box<[u8]>),
}
+assert_send_and_sync!{KeyID}
impl fmt::Display for KeyID {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -412,10 +413,4 @@ mod test {
assert_eq!(format!("{:X}", keyid), "FB3751F1587DAEF1");
assert_eq!(format!("{:x}", keyid), "fb3751f1587daef1");
}
-
- #[test]
- fn keyid_is_send_and_sync() {
- fn f<T: Send + Sync>(_: T) {}
- f("89AB CDEF 0123 4567".parse::<KeyID>().unwrap());
- }
}