diff options
author | Azul <azul@riseup.net> | 2020-12-08 09:29:18 +0100 |
---|---|---|
committer | Azul <azul@riseup.net> | 2020-12-08 12:51:56 +0100 |
commit | 6f77fb84cec4d3d62d3885ce6270919bc81419dc (patch) | |
tree | 4102eb7ebfa45ae5a94d705f652a025b4065d5a6 /openpgp | |
parent | 15429e90e6ec1ff1401500f592e8698a89b8cceb (diff) |
openpgp: Use parens for assert_send_and_sync!.
Diffstat (limited to 'openpgp')
53 files changed, 120 insertions, 120 deletions
diff --git a/openpgp/src/armor.rs b/openpgp/src/armor.rs index 0c434070..3f14cb00 100644 --- a/openpgp/src/armor.rs +++ b/openpgp/src/armor.rs @@ -72,7 +72,7 @@ pub enum Kind { File, } -assert_send_and_sync!{Kind} +assert_send_and_sync!(Kind); #[cfg(test)] impl Arbitrary for Kind { @@ -173,7 +173,7 @@ pub struct Writer<W: Write> { header: Vec<u8>, dirty: bool, } -assert_send_and_sync!{Writer<W>, W: Write} +assert_send_and_sync!(Writer<W>, W: Write); impl<W: Write> Writer<W> { /// Constructs a new filter for the given type of data. diff --git a/openpgp/src/cert.rs b/openpgp/src/cert.rs index fb6dedba..39a1f293 100644 --- a/openpgp/src/cert.rs +++ b/openpgp/src/cert.rs @@ -728,7 +728,7 @@ pub struct Cert { bad: Vec<packet::Signature>, } } // doc-hack, see above -assert_send_and_sync!{Cert} +assert_send_and_sync!(Cert); impl std::str::FromStr for Cert { type Err = anyhow::Error; @@ -2870,7 +2870,7 @@ pub struct ValidCert<'a> { // The reference time. time: time::SystemTime, } -assert_send_and_sync!{ValidCert<'_>} +assert_send_and_sync!(ValidCert<'_>); impl<'a> std::ops::Deref for ValidCert<'a> { type Target = Cert; diff --git a/openpgp/src/cert/amalgamation.rs b/openpgp/src/cert/amalgamation.rs index 2cac62e2..91328528 100644 --- a/openpgp/src/cert/amalgamation.rs +++ b/openpgp/src/cert/amalgamation.rs @@ -647,7 +647,7 @@ pub struct ComponentAmalgamation<'a, C> { cert: &'a Cert, bundle: &'a ComponentBundle<C>, } -assert_send_and_sync!{ComponentAmalgamation<'_, C>, C} +assert_send_and_sync!(ComponentAmalgamation<'_, C>, C); /// A User ID and its associated data. /// @@ -1078,7 +1078,7 @@ pub struct ValidComponentAmalgamation<'a, C> { // The binding signature at time `time`. (This is just a cache.) binding_signature: &'a Signature, } -assert_send_and_sync!{ValidComponentAmalgamation<'_, C>, C} +assert_send_and_sync!(ValidComponentAmalgamation<'_, C>, C); /// A Valid User ID and its associated data. /// diff --git a/openpgp/src/cert/amalgamation/iter.rs b/openpgp/src/cert/amalgamation/iter.rs index 8c864537..60ac9495 100644 --- a/openpgp/src/cert/amalgamation/iter.rs +++ b/openpgp/src/cert/amalgamation/iter.rs @@ -90,7 +90,7 @@ pub struct ComponentAmalgamationIter<'a, C> { cert: &'a Cert, iter: slice::Iter<'a, ComponentBundle<C>>, } -assert_send_and_sync!{ComponentAmalgamationIter<'_, C>, C} +assert_send_and_sync!(ComponentAmalgamationIter<'_, C>, C); /// An iterator over `UserIDAmalgamtion`s. /// @@ -246,7 +246,7 @@ pub struct ValidComponentAmalgamationIter<'a, C> { // at time `t`. revoked: Option<bool>, } -assert_send_and_sync!{ValidComponentAmalgamationIter<'_, C>, C} +assert_send_and_sync!(ValidComponentAmalgamationIter<'_, C>, C); /// An iterator over `ValidUserIDAmalgamtion`s. /// diff --git a/openpgp/src/cert/builder.rs b/openpgp/src/cert/builder.rs index 9b621b64..16a4339f 100644 --- a/openpgp/src/cert/builder.rs +++ b/openpgp/src/cert/builder.rs @@ -65,7 +65,7 @@ pub enum CipherSuite { /// 4096 bit RSA with SHA512 and AES256 RSA4k, } -assert_send_and_sync!{CipherSuite} +assert_send_and_sync!(CipherSuite); impl Default for CipherSuite { fn default() -> Self { @@ -134,7 +134,7 @@ pub struct KeyBlueprint { // CertBuilder::ciphersuite. ciphersuite: Option<CipherSuite>, } -assert_send_and_sync!{KeyBlueprint} +assert_send_and_sync!(KeyBlueprint); /// Simplifies the generation of OpenPGP certificates. /// @@ -175,7 +175,7 @@ pub struct CertBuilder<'a> { revocation_keys: Option<Vec<RevocationKey>>, phantom: PhantomData<&'a ()>, } -assert_send_and_sync!{CertBuilder<'_>} +assert_send_and_sync!(CertBuilder<'_>); impl CertBuilder<'_> { /// Returns a new `CertBuilder`. diff --git a/openpgp/src/cert/bundle.rs b/openpgp/src/cert/bundle.rs index 221c0888..fb5922f0 100644 --- a/openpgp/src/cert/bundle.rs +++ b/openpgp/src/cert/bundle.rs @@ -125,7 +125,7 @@ pub struct ComponentBundle<C> { // Third-party revocations (e.g., designated revokers). pub(crate) other_revocations: Vec<Signature>, } -assert_send_and_sync!{ComponentBundle<C>, C} +assert_send_and_sync!(ComponentBundle<C>, C); /// A key (primary or subkey, public or private) and any associated /// signatures. diff --git a/openpgp/src/cert/revoke.rs b/openpgp/src/cert/revoke.rs index 24fdb55b..605c61c3 100644 --- a/openpgp/src/cert/revoke.rs +++ b/openpgp/src/cert/revoke.rs @@ -81,7 +81,7 @@ use crate::cert::prelude::*; pub struct CertRevocationBuilder { builder: signature::SignatureBuilder, } -assert_send_and_sync!{CertRevocationBuilder} +assert_send_and_sync!(CertRevocationBuilder); impl CertRevocationBuilder { /// Returns a new `CertRevocationBuilder`. @@ -319,7 +319,7 @@ impl Deref for CertRevocationBuilder { pub struct SubkeyRevocationBuilder { builder: signature::SignatureBuilder, } -assert_send_and_sync!{SubkeyRevocationBuilder} +assert_send_and_sync!(SubkeyRevocationBuilder); impl SubkeyRevocationBuilder { /// Returns a new `SubkeyRevocationBuilder`. @@ -551,7 +551,7 @@ impl Deref for SubkeyRevocationBuilder { pub struct UserIDRevocationBuilder { builder: signature::SignatureBuilder, } -assert_send_and_sync!{UserIDRevocationBuilder} +assert_send_and_sync!(UserIDRevocationBuilder); impl UserIDRevocationBuilder { /// Returns a new `UserIDRevocationBuilder`. @@ -797,7 +797,7 @@ impl Deref for UserIDRevocationBuilder { pub struct UserAttributeRevocationBuilder { builder: signature::SignatureBuilder, } -assert_send_and_sync!{UserAttributeRevocationBuilder} +assert_send_and_sync!(UserAttributeRevocationBuilder); impl UserAttributeRevocationBuilder { /// Returns a new `UserAttributeRevocationBuilder`. diff --git a/openpgp/src/crypto/aead.rs b/openpgp/src/crypto/aead.rs index ed773b7d..2544f6c8 100644 --- a/openpgp/src/crypto/aead.rs +++ b/openpgp/src/crypto/aead.rs @@ -544,7 +544,7 @@ pub struct Encryptor<W: io::Write> { // A place to write encrypted data into. scratch: Vec<u8>, } -assert_send_and_sync!{Encryptor<W>, W: io::Write} +assert_send_and_sync!(Encryptor<W>, W: io::Write); impl<W: io::Write> Encryptor<W> { /// Instantiate a new AEAD encryptor. diff --git a/openpgp/src/crypto/asymmetric.rs b/openpgp/src/crypto/asymmetric.rs index 55b24d7d..3e5b5ddd 100644 --- a/openpgp/src/crypto/asymmetric.rs +++ b/openpgp/src/crypto/asymmetric.rs @@ -137,7 +137,7 @@ pub struct KeyPair { public: Key<key::PublicParts, key::UnspecifiedRole>, secret: packet::key::Unencrypted, } -assert_send_and_sync!{KeyPair} +assert_send_and_sync!(KeyPair); impl KeyPair { /// Creates a new key pair. diff --git a/openpgp/src/crypto/mem.rs b/openpgp/src/crypto/mem.rs index ea135a24..59056cac 100644 --- a/openpgp/src/crypto/mem.rs +++ b/openpgp/src/crypto/mem.rs @@ -218,7 +218,7 @@ pub struct Encrypted { ciphertext: Protected, iv: Protected, } -assert_send_and_sync!{Encrypted} +assert_send_and_sync!(Encrypted); impl PartialEq for Encrypted { fn eq(&self, other: &Self) -> bool { diff --git a/openpgp/src/crypto/mod.rs b/openpgp/src/crypto/mod.rs index 5193fcca..591d2c6f 100644 --- a/openpgp/src/crypto/mod.rs +++ b/openpgp/src/crypto/mod.rs @@ -48,7 +48,7 @@ pub(crate) mod symmetric; /// [`From`]: https://doc.rust-lang.org/std/convert/trait.From.html #[derive(Clone, PartialEq, Eq)] pub struct SessionKey(mem::Protected); -assert_send_and_sync!{SessionKey} +assert_send_and_sync!(SessionKey); impl SessionKey { /// Creates a new session key. @@ -171,7 +171,7 @@ impl fmt::Debug for SessionKey { /// ``` #[derive(Clone, PartialEq, Eq)] pub struct Password(mem::Encrypted); -assert_send_and_sync!{Password} +assert_send_and_sync!(Password); impl From<Vec<u8>> for Password { fn from(v: Vec<u8>) -> Self { diff --git a/openpgp/src/crypto/mpi.rs b/openpgp/src/crypto/mpi.rs index 541fd3b5..3fe7aa7b 100644 --- a/openpgp/src/crypto/mpi.rs +++ b/openpgp/src/crypto/mpi.rs @@ -43,7 +43,7 @@ pub struct MPI { /// Integer value as big-endian with leading zeros stripped. value: Box<[u8]>, } -assert_send_and_sync!{MPI} +assert_send_and_sync!(MPI); impl From<Vec<u8>> for MPI { fn from(v: Vec<u8>) -> Self { @@ -297,7 +297,7 @@ pub struct ProtectedMPI { /// Integer value as big-endian. value: Protected, } -assert_send_and_sync!{ProtectedMPI} +assert_send_and_sync!(ProtectedMPI); impl From<Vec<u8>> for ProtectedMPI { fn from(m: Vec<u8>) -> Self { @@ -506,7 +506,7 @@ pub enum PublicKey { rest: Box<[u8]>, }, } -assert_send_and_sync!{PublicKey} +assert_send_and_sync!(PublicKey); impl PublicKey { /// Returns the length of the public key in bits. @@ -667,7 +667,7 @@ pub enum SecretKeyMaterial { rest: Protected, }, } -assert_send_and_sync!{SecretKeyMaterial} +assert_send_and_sync!(SecretKeyMaterial); impl fmt::Debug for SecretKeyMaterial { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -868,7 +868,7 @@ pub enum SecretKeyChecksum { /// Sum of the decrypted secret key octets modulo 65536. Sum16, } -assert_send_and_sync!{SecretKeyChecksum} +assert_send_and_sync!(SecretKeyChecksum); impl Default for SecretKeyChecksum { fn default() -> Self { @@ -918,7 +918,7 @@ pub enum Ciphertext { rest: Box<[u8]>, }, } -assert_send_and_sync!{Ciphertext} +assert_send_and_sync!(Ciphertext); impl Ciphertext { /// Returns, if known, the public-key algorithm for this @@ -1029,7 +1029,7 @@ pub enum Signature { rest: Box<[u8]>, }, } -assert_send_and_sync!{Signature} +assert_send_and_sync!(Signature); impl Hash for Signature { fn hash(&self, mut hash: &mut dyn hash::Digest) { diff --git a/openpgp/src/crypto/s2k.rs b/openpgp/src/crypto/s2k.rs index 18472554..eae95b90 100644 --- a/openpgp/src/crypto/s2k.rs +++ b/openpgp/src/crypto/s2k.rs @@ -114,7 +114,7 @@ pub enum S2K { parameters: Option<Box<[u8]>>, }, } -assert_send_and_sync!{S2K} +assert_send_and_sync!(S2K); impl Default for S2K { fn default() -> Self { diff --git a/openpgp/src/crypto/symmetric.rs b/openpgp/src/crypto/symmetric.rs index a364ba53..0030b2d4 100644 --- a/openpgp/src/crypto/symmetric.rs +++ b/openpgp/src/crypto/symmetric.rs @@ -51,7 +51,7 @@ pub struct Decryptor<R: io::Read> { // Up to a block of unread data. buffer: Vec<u8>, } -assert_send_and_sync!{Decryptor<R>, R: io::Read} +assert_send_and_sync!(Decryptor<R>, R: io::Read); impl<R: io::Read> Decryptor<R> { /// Instantiate a new symmetric decryptor. `reader` is the source @@ -318,7 +318,7 @@ pub struct Encryptor<W: io::Write> { // A place to write encrypted data into. scratch: Vec<u8>, } -assert_send_and_sync!{Encryptor<W>, W: io::Write} +assert_send_and_sync!(Encryptor<W>, W: io::Write); impl<W: io::Write> Encryptor<W> { /// Instantiate a new symmetric encryptor. diff --git a/openpgp/src/fingerprint.rs b/openpgp/src/fingerprint.rs index bd6d0ffe..90e22630 100644 --- a/openpgp/src/fingerprint.rs +++ b/openpgp/src/fingerprint.rs @@ -53,7 +53,7 @@ pub enum Fingerprint { /// V3 fingerprint (deprecated) or otherwise wrong-length data. Invalid(Box<[u8]>), } -assert_send_and_sync!{Fingerprint} +assert_send_and_sync!(Fingerprint); impl fmt::Display for Fingerprint { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { diff --git a/openpgp/src/fmt.rs b/openpgp/src/fmt.rs index db372fdf..b748f8a2 100644 --- a/openpgp/src/fmt.rs +++ b/openpgp/src/fmt.rs @@ -61,7 +61,7 @@ pub mod hex { offset: usize, } - assert_send_and_sync!{Dumper<W>, W: io::Write} + assert_send_and_sync!(Dumper<W>, W: io::Write); impl<W: io::Write> Dumper<W> { /// Creates a new dumper. diff --git a/openpgp/src/keyhandle.rs b/openpgp/src/keyhandle.rs index 2eb8bb94..5506d700 100644 --- a/openpgp/src/keyhandle.rs +++ b/openpgp/src/keyhandle.rs @@ -79,7 +79,7 @@ pub enum KeyHandle { /// |