diff options
author | Azul <azul@riseup.net> | 2020-12-04 20:06:17 +0100 |
---|---|---|
committer | Azul <azul@riseup.net> | 2020-12-08 10:35:58 +0100 |
commit | b956d36cb50cac28aa9da0e373fb33c9a4c120af (patch) | |
tree | c20bb42230aed97494b6abe494bc8e22053f58a6 /openpgp/src/cert.rs | |
parent | 4a971af5abe70d41485df141a3d9fa97eaab5f1c (diff) |
openpgp: Ensure public types are Send and Sync.
- See #627.
Diffstat (limited to 'openpgp/src/cert.rs')
-rw-r--r-- | openpgp/src/cert.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/openpgp/src/cert.rs b/openpgp/src/cert.rs index 3876b8e1..287d1de9 100644 --- a/openpgp/src/cert.rs +++ b/openpgp/src/cert.rs @@ -729,6 +729,8 @@ pub struct Cert { } } // doc-hack, see above +assert_send_and_sync!{Cert} + impl std::str::FromStr for Cert { type Err = anyhow::Error; @@ -4886,12 +4888,6 @@ Pu1xwz57O4zo1VYf6TqHJzVC3OMvMUM2hhdecMUe5x6GorNaj6g= } #[test] - fn cert_is_send_and_sync() { - fn f<T: Send + Sync>(_: T) {} - f(Cert::from_bytes(crate::tests::key("testy-new.pgp")).unwrap()); - } - - #[test] fn primary_userid() { // 'really-revoked-userid' has two user ids. One of them is // revoked and then restored. Neither of the user ids has the |