summaryrefslogtreecommitdiffstats
path: root/openpgp/src/cert/builder.rs
diff options
context:
space:
mode:
Diffstat (limited to 'openpgp/src/cert/builder.rs')
-rw-r--r--openpgp/src/cert/builder.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/openpgp/src/cert/builder.rs b/openpgp/src/cert/builder.rs
index 660b9cfa..b84f02df 100644
--- a/openpgp/src/cert/builder.rs
+++ b/openpgp/src/cert/builder.rs
@@ -65,6 +65,7 @@ pub enum CipherSuite {
/// 4096 bit RSA with SHA512 and AES256
RSA4k,
}
+assert_send_and_sync!{CipherSuite}
impl Default for CipherSuite {
fn default() -> Self {
@@ -133,6 +134,7 @@ pub struct KeyBlueprint {
// CertBuilder::ciphersuite.
ciphersuite: Option<CipherSuite>,
}
+assert_send_and_sync!{KeyBlueprint}
/// Simplifies the generation of OpenPGP certificates.
///
@@ -173,6 +175,7 @@ pub struct CertBuilder<'a> {
revocation_keys: Option<Vec<RevocationKey>>,
phantom: PhantomData<&'a ()>,
}
+assert_send_and_sync!{CertBuilder<'a>, 'a}
impl CertBuilder<'_> {
/// Returns a new `CertBuilder`.
@@ -1432,10 +1435,4 @@ mod tests {
revokers.iter().collect::<HashSet<_>>());
Ok(())
}
-
- #[test]
- fn cert_builder_is_send_and_sync() {
- fn f<T: Send + Sync>(_: T) {}
- f(CertBuilder::new().generate().unwrap());
- }
}