diff options
author | Azul <azul@riseup.net> | 2020-12-08 10:34:21 +0100 |
---|---|---|
committer | Azul <azul@riseup.net> | 2020-12-08 12:51:56 +0100 |
commit | 96dfdae428197dd180cf10cff54b96ce8bc35d7b (patch) | |
tree | 8d57c13921fdbc95bd3e0438e496d240a42676f2 /openpgp/src/cert/amalgamation/key.rs | |
parent | 6f77fb84cec4d3d62d3885ce6270919bc81419dc (diff) |
openpgp: Add assert_send_and_sync! for more types.
- All types that are `Send` and `Sync` are checked now.
- Fixes #627.
Diffstat (limited to 'openpgp/src/cert/amalgamation/key.rs')
-rw-r--r-- | openpgp/src/cert/amalgamation/key.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/openpgp/src/cert/amalgamation/key.rs b/openpgp/src/cert/amalgamation/key.rs index 7071829e..d3dc085f 100644 --- a/openpgp/src/cert/amalgamation/key.rs +++ b/openpgp/src/cert/amalgamation/key.rs @@ -449,6 +449,11 @@ pub struct KeyAmalgamation<'a, P, R, R2> ca: ComponentAmalgamation<'a, Key<P, R>>, primary: R2, } +assert_send_and_sync!(KeyAmalgamation<'_, P, R, R2>, + P: key::KeyParts, + R: key::KeyRole, + R2 +); // derive(Clone) doesn't work with generic parameters that don't // implement clone. But, we don't need to require that C implements @@ -942,6 +947,11 @@ pub struct ValidKeyAmalgamation<'a, P, R, R2> // The binding signature at time `time`. (This is just a cache.) binding_signature: &'a Signature, } +assert_send_and_sync!(ValidKeyAmalgamation<'_, P, R, R2>, + P: key::KeyParts, + R: key::KeyRole, + R2: Copy +); /// A Valid primary Key, and its associated data. /// |