summaryrefslogtreecommitdiffstats
path: root/openpgp/src/keyhandle.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/keyhandle.rs
parent4a971af5abe70d41485df141a3d9fa97eaab5f1c (diff)
openpgp: Ensure public types are Send and Sync.
- See #627.
Diffstat (limited to 'openpgp/src/keyhandle.rs')
-rw-r--r--openpgp/src/keyhandle.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/openpgp/src/keyhandle.rs b/openpgp/src/keyhandle.rs
index cfa78f3a..2eb8bb94 100644
--- a/openpgp/src/keyhandle.rs
+++ b/openpgp/src/keyhandle.rs
@@ -79,6 +79,7 @@ pub enum KeyHandle {
/// A KeyID.
KeyID(KeyID),
}
+assert_send_and_sync!{KeyHandle}
impl std::fmt::Display for KeyHandle {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
@@ -313,11 +314,4 @@ mod tests {
let handle = KeyHandle::KeyID(KeyID::Invalid(Box::new([10, 2])));
assert_eq!(format!("{:x}", handle), "0a02");
}
-
- #[test]
- fn key_handle_is_send_and_sync() {
- fn f<T: Send + Sync>(_: T) {}
- f(KeyHandle::from("0123 4567 89AB CDEF 0123 4567 89AB CDEF 0123 4567"
- .parse::<Fingerprint>().unwrap()));
- }
}