From 6f77fb84cec4d3d62d3885ce6270919bc81419dc Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 8 Dec 2020 09:29:18 +0100 Subject: openpgp: Use parens for assert_send_and_sync!. --- openpgp/src/armor.rs | 4 ++-- openpgp/src/cert.rs | 4 ++-- openpgp/src/cert/amalgamation.rs | 4 ++-- openpgp/src/cert/amalgamation/iter.rs | 4 ++-- openpgp/src/cert/builder.rs | 6 +++--- openpgp/src/cert/bundle.rs | 2 +- openpgp/src/cert/revoke.rs | 8 ++++---- openpgp/src/crypto/aead.rs | 2 +- openpgp/src/crypto/asymmetric.rs | 2 +- openpgp/src/crypto/mem.rs | 2 +- openpgp/src/crypto/mod.rs | 4 ++-- openpgp/src/crypto/mpi.rs | 14 +++++++------- openpgp/src/crypto/s2k.rs | 2 +- openpgp/src/crypto/symmetric.rs | 4 ++-- openpgp/src/fingerprint.rs | 2 +- openpgp/src/fmt.rs | 2 +- openpgp/src/keyhandle.rs | 2 +- openpgp/src/keyid.rs | 2 +- openpgp/src/lib.rs | 2 +- openpgp/src/macros.rs | 8 ++++---- openpgp/src/message/mod.rs | 4 ++-- openpgp/src/packet/aed.rs | 2 +- openpgp/src/packet/compressed_data.rs | 2 +- openpgp/src/packet/container.rs | 4 ++-- openpgp/src/packet/header/ctb.rs | 8 ++++---- openpgp/src/packet/header/mod.rs | 4 ++-- openpgp/src/packet/key.rs | 20 ++++++++++---------- openpgp/src/packet/literal.rs | 2 +- openpgp/src/packet/marker.rs | 2 +- openpgp/src/packet/mod.rs | 20 ++++++++++---------- openpgp/src/packet/one_pass_sig.rs | 2 +- openpgp/src/packet/pkesk.rs | 2 +- openpgp/src/packet/seip.rs | 2 +- openpgp/src/packet/signature.rs | 6 +++--- openpgp/src/packet/signature/subpacket.rs | 14 +++++++------- openpgp/src/packet/tag.rs | 2 +- openpgp/src/packet/trust.rs | 2 +- openpgp/src/packet/unknown.rs | 2 +- openpgp/src/packet/user_attribute.rs | 8 ++++---- openpgp/src/packet/userid.rs | 4 ++-- openpgp/src/packet_pile.rs | 2 +- openpgp/src/parse.rs | 2 +- openpgp/src/parse/map.rs | 4 ++-- openpgp/src/parse/packet_parser_builder.rs | 2 +- openpgp/src/parse/stream.rs | 4 ++-- openpgp/src/policy.rs | 4 ++-- openpgp/src/serialize/stream.rs | 16 ++++++++-------- openpgp/src/serialize/stream/padding.rs | 2 +- openpgp/src/types/compression_level.rs | 2 +- openpgp/src/types/features.rs | 2 +- openpgp/src/types/key_flags.rs | 2 +- openpgp/src/types/server_preferences.rs | 2 +- openpgp/src/types/timestamp.rs | 4 ++-- 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 { header: Vec, dirty: bool, } -assert_send_and_sync!{Writer, W: Write} +assert_send_and_sync!(Writer, W: Write); impl Writer { /// 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, } } // 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, } -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>, } -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, } -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, } -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>, 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 { // Third-party revocations (e.g., designated revokers). pub(crate) other_revocations: Vec, } -assert_send_and_sync!{ComponentBundle, C} +assert_send_and_sync!(ComponentBundle, 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 { // A place to write encrypted data into. scratch: Vec, } -assert_send_and_sync!{Encryptor, W: io::Write} +assert_send_and_sync!(Encryptor, W: io::Write); impl Encryptor { /// 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, 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> for Password { fn from(v: Vec) -> 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> for MPI { fn from(v: Vec) -> 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> for ProtectedMPI { fn from(m: Vec) -> 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>, }, } -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 { // Up to a block of unread data. buffer: Vec, } -assert_send_and_sync!{Decryptor, R: io::Read} +assert_send_and_sync!(Decryptor, R: io::Read); impl Decryptor { /// Instantiate a new symmetric decryptor. `reader` is the source @@ -318,7 +318,7 @@ pub struct Encryptor { // A place to write encrypted data into. scratch: Vec, } -assert_send_and_sync!{Encryptor, W: io::Write} +assert_send_and_sync!(Encryptor, W: io::Write); impl Encryptor { /// 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: io::Write} + assert_send_and_sync!(Dumper, W: io::Write); impl Dumper { /// 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 { /// A KeyID. KeyID(KeyID), } -assert_send_and_sync!{KeyHandle} +assert_send_and_sync!(KeyHandle); impl std::fmt::Display for KeyHandle { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/openpgp/src/keyid.rs b/openpgp/src/keyid.rs index 3e7f38cc..bd20fe1d 100644 --- a/openpgp/src/keyid.rs +++ b/openpgp/src/keyid.rs @@ -65,7 +65,7 @@ pub enum KeyID { /// e.g. wrong number of bytes. Invalid(Box<[u8]>), } -assert_send_and_sync!{KeyID} +assert_send_and_sync!(KeyID); impl fmt::Display for KeyID { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { diff --git a/openpgp/src/lib.rs b/openpgp/src/lib.rs index a0b5c642..65612ce8 100644 --- a/openpgp/src/lib.rs +++ b/openpgp/src/lib.rs @@ -303,4 +303,4 @@ pub enum Error { PolicyViolation(String, Option), } -assert_send_and_sync!{Error} +assert_send_and_sync!(Error); diff --git a/openpgp/src/macros.rs b/openpgp/src/macros.rs index 23167c4e..ef87d400 100644 --- a/openpgp/src/macros.rs +++ b/openpgp/src/macros.rs @@ -115,14 +115,14 @@ macro_rules! time_it { /// /// ``` /// pub struct MyStruct {} -/// assert_send_and_sync!{MyStruct} +/// assert_send_and_sync!(MyStruct); /// ``` /// /// For types with lifetimes, use the anonymous lifetime: /// /// ``` /// pub struct WithLifetime<'a> {} -/// assert_send_and_sync!{MyStruct<'_>} +/// assert_send_and_sync!(MyStruct<'_>); /// ``` /// /// For a type generic over another type `W`, @@ -131,7 +131,7 @@ macro_rules! time_it { /// /// ``` /// pub struct MyWriter {} -/// assert_send_and_sync!{MyWriterStruct, W: io::Write} +/// assert_send_and_sync!(MyWriterStruct, W: io::Write); /// ``` /// /// This will assert that `MyWriterStruct` is `Send` and `Sync` @@ -141,7 +141,7 @@ macro_rules! time_it { /// /// ``` /// pub struct MyWriterWithLifetime {} -/// assert_send_and_sync!{MyWriterStruct<'_, C, W>, C, W: io::Write} +/// assert_send_and_sync!(MyWriterStruct<'_, C, W>, C, W: io::Write); /// ``` /// macro_rules! assert_send_and_sync { diff --git a/openpgp/src/message/mod.rs b/openpgp/src/message/mod.rs index 587a7e59..e92581a5 100644 --- a/openpgp/src/message/mod.rs +++ b/openpgp/src/message/mod.rs @@ -56,7 +56,7 @@ pub enum MessageParserError { /// An OpenPGP error. OpenPGP(Error), } -assert_send_and_sync!{MessageParserError} +assert_send_and_sync!(MessageParserError); impl From for anyhow::Error { fn from(err: MessageParserError) -> Self { @@ -347,7 +347,7 @@ pub struct Message { pub(super) pile: PacketPile, } } // doc-hack, see above -assert_send_and_sync!{Message} +assert_send_and_sync!(Message); impl fmt::Debug for Message { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { diff --git a/openpgp/src/packet/aed.rs b/openpgp/src/packet/aed.rs index de44d2fd..791da403 100644 --- a/openpgp/src/packet/aed.rs +++ b/openpgp/src/packet/aed.rs @@ -124,7 +124,7 @@ pub struct AED1 { /// This is a container packet. container: packet::Container, } -assert_send_and_sync!{AED1} +assert_send_and_sync!(AED1); impl std::ops::Deref for AED1 { type Target = packet::Container; diff --git a/openpgp/src/packet/compressed_data.rs b/openpgp/src/packet/compressed_data.rs index cbf94b51..76ec27ee 100644 --- a/openpgp/src/packet/compressed_data.rs +++ b/openpgp/src/packet/compressed_data.rs @@ -29,7 +29,7 @@ pub struct CompressedData { /// This is a container packet. container: packet::Container, } -assert_send_and_sync!{CompressedData} +assert_send_and_sync!(CompressedData); impl std::ops::Deref for CompressedData { type Target = packet::Container; diff --git a/openpgp/src/packet/container.rs b/openpgp/src/packet/container.rs index 5a043634..509b7dcb 100644 --- a/openpgp/src/packet/container.rs +++ b/openpgp/src/packet/container.rs @@ -95,7 +95,7 @@ pub enum Body { Structured(Vec), } -assert_send_and_sync!{Body} +assert_send_and_sync!(Body); /// Holds packet bodies. /// @@ -110,7 +110,7 @@ pub struct Container { body_digest: Vec, } -assert_send_and_sync!{Container} +assert_send_and_sync!(Container); impl std::ops::Deref for Container { type Target = Body; diff --git a/openpgp/src/packet/header/ctb.rs b/openpgp/src/packet/header/ctb.rs index 8dc2e949..2e32b41d 100644 --- a/openpgp/src/packet/header/ctb.rs +++ b/openpgp/src/packet/header/ctb.rs @@ -39,7 +39,7 @@ pub struct CTBNew { /// Packet CTB fields common: CTBCommon, } -assert_send_and_sync!{CTBNew} +assert_send_and_sync!(CTBNew); impl CTBNew { /// Constructs a new-style CTB. @@ -91,7 +91,7 @@ pub enum PacketLengthType { /// from the context, e.g., EOF. Indeterminate, } -assert_send_and_sync!{PacketLengthType} +assert_send_and_sync!(PacketLengthType); impl TryFrom for PacketLengthType { type Error = anyhow::Error; @@ -131,7 +131,7 @@ pub struct CTBOld { /// Type of length specifier. length_type: PacketLengthType, } -assert_send_and_sync!{CTBOld} +assert_send_and_sync!(CTBOld); impl CTBOld { /// Constructs an old-style CTB. @@ -207,7 +207,7 @@ pub enum CTB { /// Old PGP 2.6 header format. Old(CTBOld), } -assert_send_and_sync!{CTB} +assert_send_and_sync!(CTB); impl CTB { /// Constructs a new-style CTB. diff --git a/openpgp/src/packet/header/mod.rs b/openpgp/src/packet/header/mod.rs index 8f455b1c..ad8f344a 100644 --- a/openpgp/src/packet/header/mod.rs +++ b/openpgp/src/packet/header/mod.rs @@ -38,7 +38,7 @@ pub struct Header { /// The packet's length. length: BodyLength, } -assert_send_and_sync!{Header} +assert_send_and_sync!(Header); impl Header { /// Creates a new header. @@ -246,4 +246,4 @@ pub enum BodyLength { /// This type is only used with old format packets. Indeterminate, } -assert_send_and_sync!{BodyLength} +assert_send_and_sync!(BodyLength); diff --git a/openpgp/src/packet/key.rs b/openpgp/src/packet/key.rs index da53991d..99584a6e 100644 --- a/openpgp/src/packet/key.rs +++ b/openpgp/src/packet/key.rs @@ -441,7 +441,7 @@ pub trait KeyRole: fmt::Debug + seal::Sealed { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] pub struct PublicParts; -assert_send_and_sync!{PublicParts} +assert_send_and_sync!(PublicParts); impl seal::Sealed for PublicParts {} impl KeyParts for PublicParts { @@ -494,7 +494,7 @@ impl KeyParts for PublicParts { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] pub struct SecretParts; -assert_send_and_sync!{SecretParts} +assert_send_and_sync!(SecretParts); impl seal::Sealed for SecretParts {} impl KeyParts for SecretParts { @@ -555,7 +555,7 @@ impl KeyParts for SecretParts { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] pub struct UnspecifiedParts; -assert_send_and_sync!{UnspecifiedParts} +assert_send_and_sync!(UnspecifiedParts); impl seal::Sealed for UnspecifiedParts {} impl KeyParts for UnspecifiedParts { @@ -600,7 +600,7 @@ impl KeyParts for UnspecifiedParts { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] pub struct PrimaryRole; -assert_send_and_sync!{PrimaryRole} +assert_send_and_sync!(PrimaryRole); impl seal::Sealed for PrimaryRole {} impl KeyRole for PrimaryRole { @@ -634,7 +634,7 @@ impl KeyRole for PrimaryRole { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] pub struct SubordinateRole; -assert_send_and_sync!{SubordinateRole} +assert_send_and_sync!(SubordinateRole); impl seal::Sealed for SubordinateRole {} impl KeyRole for SubordinateRole { @@ -674,7 +674,7 @@ impl KeyRole for SubordinateRole { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] pub struct UnspecifiedRole; -assert_send_and_sync!{UnspecifiedRole} +assert_send_and_sync!(UnspecifiedRole); impl seal::Sealed for UnspecifiedRole {} impl KeyRole for UnspecifiedRole { @@ -782,7 +782,7 @@ pub struct Key4 r: std::marker::PhantomData, } -assert_send_and_sync!{Key4, P: KeyParts, R: KeyRole} +assert_send_and_sync!(Key4, P: KeyParts, R: KeyRole); impl PartialEq for Key4 { fn eq(&self, other: &Key4) -> bool { @@ -1236,7 +1236,7 @@ pub enum SecretKeyMaterial { Encrypted(Encrypted), } -assert_send_and_sync!{SecretKeyMaterial} +assert_send_and_sync!(SecretKeyMaterial); impl From for SecretKeyMaterial { fn from(mpis: mpi::SecretKeyMaterial) -> Self { @@ -1364,7 +1364,7 @@ pub struct Unencrypted { mpis: mem::Encrypted, } -assert_send_and_sync!{Unencrypted} +assert_send_and_sync!(Unencrypted); impl From for Unencrypted { fn from(mpis: mpi::SecretKeyMaterial) -> Self { @@ -1451,7 +1451,7 @@ pub struct Encrypted { Box<[u8]>>, // S2K body + IV + ciphertext. } -assert_send_and_sync!{Encrypted} +assert_send_and_sync!(Encrypted); // Because the S2K and ciphertext cannot be cleanly separated at parse // time, we need to carefully compare and hash encrypted key packets. diff --git a/openpgp/src/packet/literal.rs b/openpgp/src/packet/literal.rs index acf388c0..29bfa187 100644 --- a/openpgp/src/packet/literal.rs +++ b/openpgp/src/packet/literal.rs @@ -47,7 +47,7 @@ pub struct Literal { /// if `buffer_unread_content` is used. container: packet::Container, } -assert_send_and_sync!{Literal} +assert_send_and_sync!(Literal); impl fmt::Debug for Literal { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { diff --git a/openpgp/src/packet/marker.rs b/openpgp/src/packet/marker.rs index 98d5557c..f8b84842 100644 --- a/openpgp/src/packet/marker.rs +++ b/openpgp/src/packet/marker.rs @@ -16,7 +16,7 @@ pub struct Marker { /// CTB packet header fields. pub(crate) common: packet::Common, } -assert_send_and_sync!{Marker} +assert_send_and_sync!(Marker); impl Marker { pub(crate) const BODY: &'static [u8] = &[0x50, 0x47, 0x50]; diff --git a/openpgp/src/packet/mod.rs b/openpgp/src/packet/mod.rs index c4d94b03..330ed9f4 100644 --- a/openpgp/src/packet/mod.rs +++ b/openpgp/src/packet/mod.rs @@ -284,7 +284,7 @@ pub enum Packet { AED(AED), } } // doc-hack, see above -assert_send_and_sync!{Packet} +assert_send_and_sync!(Packet); macro_rules! impl_into_iterator { ($t:ty) => { @@ -520,7 +520,7 @@ pub struct Common { /// this structure actually gains some fields. dummy: std::marker::PhantomData<()>, } -assert_send_and_sync!{Common} +assert_send_and_sync!(Common); #[cfg(test)] impl Arbitrary for Common { @@ -599,7 +599,7 @@ pub struct Iter<'a> { // `paths` iter. depth: usize, } -assert_send_and_sync!{Iter<'_>} +assert_send_and_sync!(Iter<'_>); impl<'a> Default for Iter<'a> { fn default() -> Self { @@ -920,7 +920,7 @@ pub enum Signature { /// Signature packet version 4. V4(self::signature::Signature4), } -assert_send_and_sync!{Signature} +assert_send_and_sync!(Signature); impl Signature { /// Gets the version. @@ -978,7 +978,7 @@ pub enum OnePassSig { /// OnePassSig packet version 3. V3(self::one_pass_sig::OnePassSig3), } -assert_send_and_sync!{OnePassSig} +assert_send_and_sync!(OnePassSig); impl OnePassSig { /// Gets the version. @@ -1040,7 +1040,7 @@ pub enum PKESK { /// PKESK packet version 3. V3(self::pkesk::PKESK3), } -assert_send_and_sync!{PKESK} +assert_send_and_sync!(PKESK); impl PKESK { /// Gets the version. @@ -1106,7 +1106,7 @@ pub enum SKESK { /// This feature is [experimental](../index.html#experimental-features). V5(self::skesk::SKESK5), } -assert_send_and_sync!{SKESK} +assert_send_and_sync!(SKESK); impl SKESK { /// Gets the version. @@ -1438,7 +1438,7 @@ pub enum Key { /// A version 4 `Key` packet. V4(Key4), } -assert_send_and_sync!{Key, P: key::KeyParts, R: key::KeyRole} +assert_send_and_sync!(Key, P: key::KeyParts, R: key::KeyRole); impl fmt::Display for Key { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -1818,7 +1818,7 @@ pub enum SEIP { /// SEIP packet version 1. V1(self::seip::SEIP1), } -assert_send_and_sync!{SEIP} +assert_send_and_sync!(SEIP); impl SEIP { /// Gets the version. @@ -1880,7 +1880,7 @@ pub enum AED { /// AED packet version 1. V1(self::aed::AED1), } -assert_send_and_sync!{AED} +assert_send_and_sync!(AED); impl AED { /// Gets the version. diff --git a/openpgp/src/packet/one_pass_sig.rs b/openpgp/src/packet/one_pass_sig.rs index ef5123e1..452cc3e7 100644 --- a/openpgp/src/packet/one_pass_sig.rs +++ b/openpgp/src/packet/one_pass_sig.rs @@ -47,7 +47,7 @@ pub struct OnePassSig3 { /// is nested. last: u8, } -assert_send_and_sync!{OnePassSig3} +assert_send_and_sync!(OnePassSig3); impl fmt::Debug for OnePassSig3 { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { diff --git a/openpgp/src/packet/pkesk.rs b/openpgp/src/packet/pkesk.rs index 59c2a459..cba96f55 100644 --- a/openpgp/src/packet/pkesk.rs +++ b/openpgp/src/packet/pkesk.rs @@ -41,7 +41,7 @@ pub struct PKESK3 { esk: Ciphertext, } -assert_send_and_sync!{PKESK3} +assert_send_and_sync!(PKESK3); impl PKESK3 { /// Creates a new PKESK3 packet. diff --git a/openpgp/src/packet/seip.rs b/openpgp/src/packet/seip.rs index 4263e6ae..e79bb2bb 100644 --- a/openpgp/src/packet/seip.rs +++ b/openpgp/src/packet/seip.rs @@ -31,7 +31,7 @@ pub struct SEIP1 { container: packet::Container, } -assert_send_and_sync!{SEIP1} +assert_send_and_sync!(SEIP1); impl std::ops::Deref for SEIP1 { type Target = packet::Container; diff --git a/openpgp/src/packet/signature.rs b/openpgp/src/packet/signature.rs index b86eb3cc..ab388738 100644 --- a/openpgp/src/packet/signature.rs +++ b/openpgp/src/packet/signature.rs @@ -223,7 +223,7 @@ pub struct SignatureFields { /// Subpackets. subpackets: SubpacketAreas, } -assert_send_and_sync!{SignatureFields} +assert_send_and_sync!(SignatureFields); #[cfg(test)] impl ArbitraryBounded for SignatureFields { @@ -453,7 +453,7 @@ pub struct SignatureBuilder { original_creation_time: Option, fields: SignatureFields, } -assert_send_and_sync!{SignatureBuilder} +assert_send_and_sync!(SignatureBuilder); impl Deref for SignatureBuilder { type Target = SignatureFields; @@ -1696,7 +1696,7 @@ pub struct Signature4 { /// verification is usually expected to be idempotent. additional_issuers: Vec, } -assert_send_and_sync!{Signature4} +assert_send_and_sync!(Signature4); impl fmt::Debug for Signature4 { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { diff --git a/openpgp/src/packet/signature/subpacket.rs b/openpgp/src/packet/signature/subpacket.rs index ced38c04..b7760de0 100644 --- a/openpgp/src/packet/signature/subpacket.rs +++ b/openpgp/src/packet/signature/subpacket.rs @@ -324,7 +324,7 @@ pub enum SubpacketTag { /// Unknown subpacket tag. Unknown(u8), } -assert_send_and_sync!{SubpacketTag} +assert_send_and_sync!(SubpacketTag); impl fmt::Display for SubpacketTag { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -501,7 +501,7 @@ pub struct SubpacketArea { // This is an option, because we parse the subpacket area lazily. parsed: Mutex>>>, } -assert_send_and_sync!{SubpacketArea} +assert_send_and_sync!(SubpacketArea); #[cfg(test)] impl ArbitraryBounded for SubpacketArea { @@ -1077,7 +1077,7 @@ pub struct NotationData { name: String, value: Vec, } -assert_send_and_sync!{NotationData} +assert_send_and_sync!(NotationData); #[cfg(test)] impl Arbitrary for NotationData { @@ -1123,7 +1123,7 @@ impl NotationData { /// Flags for the Notation Data subpacket. #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct NotationDataFlags(crate::types::Bitfield); -assert_send_and_sync!{NotationDataFlags} +assert_send_and_sync!(NotationDataFlags); #[cfg(test)] impl Arbitrary for NotationDataFlags { @@ -1519,7 +1519,7 @@ pub enum SubpacketValue { /// [Section 5.2.3.29 of RFC 4880bis]: https://www.ietf.org/id/draft-ietf-openpgp-rfc4880bis-09.html#section-5.2.3.29 IntendedRecipient(Fingerprint), } -assert_send_and_sync!{SubpacketValue} +assert_send_and_sync!(SubpacketValue); #[cfg(test)] impl ArbitraryBounded for SubpacketValue { @@ -1678,7 +1678,7 @@ pub struct Subpacket { /// authenticated in the context of its signature. authenticated: bool, } -assert_send_and_sync!{Subpacket} +assert_send_and_sync!(Subpacket); impl PartialEq for Subpacket { fn eq(&self, other: &Subpacket) -> bool { @@ -1962,7 +1962,7 @@ pub struct SubpacketAreas { /// Subpackets that are _not_ part of the signature. unhashed_area: SubpacketArea, } -assert_send_and_sync!{SubpacketAreas} +assert_send_and_sync!(SubpacketAreas); #[cfg(test)] impl ArbitraryBounded for SubpacketAreas { diff --git a/openpgp/src/packet/tag.rs b/openpgp/src/packet/tag.rs index b08fd9c8..538aee92 100644 --- a/openpgp/src/packet/tag.rs +++ b/openpgp/src/packet/tag.rs @@ -59,7 +59,7 @@ pub enum Tag { /// Experimental packets. Private(u8), } -assert_send_and_sync!{Tag} +assert_send_and_sync!(Tag); impl Eq for Tag {} diff --git a/openpgp/src/packet/trust.rs b/openpgp/src/packet/trust.rs index 3455fdfd..ff4bd351 100644 --- a/openpgp/src/packet/trust.rs +++ b/openpgp/src/packet/trust.rs @@ -23,7 +23,7 @@ pub struct Trust { value: Vec, } -assert_send_and_sync!{Trust} +assert_send_and_sync!(Trust); impl From> for Trust { fn from(u: Vec) -> Self { diff --git a/openpgp/src/packet/unknown.rs b/openpgp/src/packet/unknown.rs index 35686da2..086f1b32 100644 --- a/openpgp/src/packet/unknown.rs +++ b/openpgp/src/packet/unknown.rs @@ -32,7 +32,7 @@ pub struct Unknown { container: packet::Container, } -assert_send_and_sync!{Unknown} +assert_send_and_sync!(Unknown); impl PartialEq for Unknown { fn eq(&self, other: &Unknown) -> bool { diff --git a/openpgp/src/packet/user_attribute.rs b/openpgp/src/packet/user_attribute.rs index ec44382a..851e3126 100644 --- a/openpgp/src/packet/user_attribute.rs +++ b/openpgp/src/packet/user_attribute.rs @@ -38,7 +38,7 @@ pub struct UserAttribute { /// The user attribute. value: Vec, } -assert_send_and_sync!{UserAttribute} +assert_send_and_sync!(UserAttribute); impl From> for UserAttribute { fn from(u: Vec) -> Self { @@ -118,7 +118,7 @@ impl Arbitrary for UserAttribute { pub struct SubpacketIterator<'a> { reader: buffered_reader::Memory<'a, ()>, } -assert_send_and_sync!{SubpacketIterator<'_>} +assert_send_and_sync!(SubpacketIterator<'_>); impl<'a> Iterator for SubpacketIterator<'a> { type Item = Result; @@ -193,7 +193,7 @@ pub enum Subpacket { /// Unknown subpacket. Unknown(u8, Box<[u8]>), } -assert_send_and_sync!{Subpacket} +assert_send_and_sync!(Subpacket); #[cfg(test)] impl Arbitrary for Subpacket { @@ -227,7 +227,7 @@ pub enum Image { /// Unknown image format. Unknown(u8, Box<[u8]>), } -assert_send_and_sync!{Image} +assert_send_and_sync!(Image); #[cfg(test)] impl Arbitrary for Image { diff --git a/openpgp/src/packet/userid.rs b/openpgp/src/packet/userid.rs index a0962b8c..44e9b510 100644 --- a/openpgp/src/packet/userid.rs +++ b/openpgp/src/packet/userid.rs @@ -26,7 +26,7 @@ pub struct ConventionallyParsedUserID { email: Option<(usize, usize)>, uri: Option<(usize, usize)>, } -assert_send_and_sync!{ConventionallyParsedUserID} +assert_send_and_sync!(ConventionallyParsedUserID); impl ConventionallyParsedUserID { /// Parses the userid according to the usual conventions. @@ -476,7 +476,7 @@ pub struct UserID { parsed: Mutex>>, } -assert_send_and_sync!{UserID} +assert_send_and_sync!(UserID); impl From> for UserID { fn from(u: Vec) -> Self { diff --git a/openpgp/src/packet_pile.rs b/openpgp/src/packet_pile.rs index 3df9581a..3d0bbe94 100644 --- a/openpgp/src/packet_pile.rs +++ b/openpgp/src/packet_pile.rs @@ -113,7 +113,7 @@ pub struct PacketPile { top_level: Container, } -assert_send_and_sync!{PacketPile} +assert_send_and_sync!(PacketPile); impl fmt::Debug for PacketPile { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { diff --git a/openpgp/src/parse.rs b/openpgp/src/parse.rs index 1d25ca38..5840436c 100644 --- a/openpgp/src/parse.rs +++ b/openpgp/src/parse.rs @@ -707,7 +707,7 @@ pub struct Cookie { /// encounters a fake EOF at the level it is popping to. fake_eof: bool, } -assert_send_and_sync!{Cookie} +assert_send_and_sync!(Cookie); /// Contains hashes for consecutive one pass signature packets ending /// in one with the last flag set. diff --git a/openpgp/src/parse/map.rs b/openpgp/src/parse/map.rs index 3ebcba77..d584b16f 100644 --- a/openpgp/src/parse/map.rs +++ b/openpgp/src/parse/map.rs @@ -34,7 +34,7 @@ pub struct Map { header: Vec, data: Vec, } -assert_send_and_sync!{Map} +assert_send_and_sync!(Map); /// Represents an entry in the map. #[derive(Clone, Debug)] @@ -114,7 +114,7 @@ pub struct Field<'a> { /// Value of the field. data: &'a [u8], } -assert_send_and_sync!{Field<'_>} +assert_send_and_sync!(Field<'_>); impl<'a> Field<'a> { fn new(map: &'a Map, i: usize) -> Option> { diff --git a/openpgp/src/parse/packet_parser_builder.rs b/openpgp/src/parse/packet_parser_builder.rs index dfea3e25..a5617a04 100644 --- a/openpgp/src/parse/packet_parser_builder.rs +++ b/openpgp/src/parse/packet_parser_builder.rs @@ -51,7 +51,7 @@ pub enum Dearmor { /// [`ReaderMode`]: ../armor/enum.ReaderMode.html Auto(armor::ReaderMode), } -assert_send_and_sync!{Dearmor} +assert_send_and_sync!(Dearmor); impl Default for Dearmor { fn default() -> Self { diff --git a/openpgp/src/parse/stream.rs b/openpgp/src/parse/stream.rs index e8bd8d42..3cb1ae78 100644 --- a/openpgp/src/parse/stream.rs +++ b/openpgp/src/parse/stream.rs @@ -231,7 +231,7 @@ pub struct GoodChecksum<'a> { /// trustworthiness of the signature using a trust model. pub ka: ValidErasedKeyAmalgamation<'a, key::PublicParts>, } -assert_send_and_sync!{GoodChecksum<'_>} +assert_send_and_sync!(GoodChecksum<'_>); /// A bad signature. /// @@ -455,7 +455,7 @@ impl<'a> VerificationErrorInternal<'a> { /// [test of unusual message structures]: https://tests.sequoia-pgp.org/#Unusual_Message_Structure #[derive(Debug)] pub struct MessageStructure<'a>(Vec>); -assert_send_and_sync!{MessageStructure<'_>} +assert_send_and_sync!(MessageStructure<'_>); impl<'a> MessageStructure<'a> { fn new() -> Self { diff --git a/openpgp/src/policy.rs b/openpgp/src/policy.rs index 4920317b..2a891fd2 100644 --- a/openpgp/src/policy.rs +++ b/openpgp/src/policy.rs @@ -188,7 +188,7 @@ pub struct StandardPolicy<'a> { asymmetric_algos: AsymmetricAlgorithmCutoffList, } -assert_send_and_sync!{StandardPolicy<'_>} +assert_send_and_sync!(StandardPolicy<'_>); impl<'a> Default for StandardPolicy<'a> { fn default() -> Self { @@ -956,7 +956,7 @@ impl From for u8 { pub struct NullPolicy { } -assert_send_and_sync!{NullPolicy} +assert_send_and_sync!(NullPolicy); impl NullPolicy { /// Instantiates a new `NullPolicy`. diff --git a/openpgp/src/serialize/stream.rs b/openpgp/src/serialize/stream.rs index 0948a242..e69fdd29 100644 --- a/openpgp/src/serialize/stream.rs +++ b/openpgp/src/serialize/stream.rs @@ -205,7 +205,7 @@ impl Default for Cookie { /// [`Message::finalize`]: #method.finalize #[derive(Debug)] pub struct Message<'a>(writer::BoxStack<'a, Cookie>); -assert_send_and_sync!{Message<'_>} +assert_send_and_sync!(Message<'_>); impl<'a> Message<'a> { /// Starts streaming an OpenPGP message. @@ -345,7 +345,7 @@ pub struct Armorer<'a> { headers: Vec<(String, String)>, inner: Message<'a>, } -assert_send_and_sync!{Armorer<'_>} +assert_send_and_sync!(Armorer<'_>); impl<'a> Armorer<'a> { /// Creates a new armoring filter. @@ -535,7 +535,7 @@ impl<'a> fmt::Debug for Armorer<'a> { pub struct ArbitraryWriter<'a> { inner: writer::BoxStack<'a, Cookie>, } -assert_send_and_sync!{ArbitraryWriter<'_>} +assert_send_and_sync!(ArbitraryWriter<'_>); impl<'a> ArbitraryWriter<'a> { /// Creates a new writer with the given tag. @@ -646,7 +646,7 @@ pub struct Signer<'a> { cookie: Cookie, position: u64, } -assert_send_and_sync!{Signer<'_>} +assert_send_and_sync!(Signer<'_>); impl<'a> Signer<'a> { /// Creates a signer. @@ -1280,7 +1280,7 @@ pub struct LiteralWriter<'a> { inner: writer::BoxStack<'a, Cookie>, signature_writer: Option>, } -assert_send_and_sync!{LiteralWriter<'_>} +assert_send_and_sync!(LiteralWriter<'_>); impl<'a> LiteralWriter<'a> { /// Creates a new literal writer. @@ -1553,7 +1553,7 @@ pub struct Compressor<'a> { level: CompressionLevel, inner: writer::BoxStack<'a, Cookie>, } -assert_send_and_sync!{Compressor<'_>} +assert_send_and_sync!(Compressor<'_>); impl<'a> Compressor<'a> { /// Creates a new compressor using the default algorithm and @@ -1805,7 +1805,7 @@ pub struct Recipient<'a> { keyid: KeyID, key: &'a Key, } -assert_send_and_sync!{Recipient<'_>} +assert_send_and_sync!(Recipient<'_>); impl<'a, P, R> From<&'a Key> for Recipient<'a> where P: key::KeyParts, @@ -2087,7 +2087,7 @@ pub struct Encryptor<'a> { hash: Box, cookie: Cookie, } -assert_send_and_sync!{Encryptor<'_>} +assert_send_and_sync!(Encryptor<'_>); impl<'a> Encryptor<'a> { /// Creates a new encryptor for the given recipients. diff --git a/openpgp/src/serialize/stream/padding.rs b/openpgp/src/serialize/stream/padding.rs index 99eef521..9af57830 100644 --- a/openpgp/src/serialize/stream/padding.rs +++ b/openpgp/src/serialize/stream/padding.rs @@ -144,7 +144,7 @@ pub struct Padder<'a> { inner: writer::BoxStack<'a, Cookie>, policy: fn(u64) -> u64, } -assert_send_and_sync!{Padder<'_>} +assert_send_and_sync!(Padder<'_>); impl<'a> Padder<'a> { /// Creates a new padder with the given policy. diff --git a/openpgp/src/types/compression_level.rs b/openpgp/src/types/compression_level.rs index b414ef74..e3e102ff 100644 --- a/openpgp/src/types/compression_level.rs +++ b/openpgp/src/types/compression_level.rs @@ -50,7 +50,7 @@ use crate::{ /// ``` #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct CompressionLevel(u8); -assert_send_and_sync!{CompressionLevel} +assert_send_and_sync!(CompressionLevel); impl Default for CompressionLevel { fn default() -> Self { diff --git a/openpgp/src/types/features.rs b/openpgp/src/types/features.rs index 4d15766c..e5efb26f 100644 --- a/openpgp/src/types/features.rs +++ b/openpgp/src/types/features.rs @@ -55,7 +55,7 @@ use crate::types::Bitfield; /// ``` #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct Features(Bitfield); -assert_send_and_sync!{Features} +assert_send_and_sync!(Features); impl fmt::Debug for Features { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { diff --git a/openpgp/src/types/key_flags.rs b/openpgp/src/types/key_flags.rs index 24583114..e4ea0bbc 100644 --- a/openpgp/src/types/key_flags.rs +++ b/openpgp/src/types/key_flags.rs @@ -49,7 +49,7 @@ use crate::types::Bitfield; /// ``` #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct KeyFlags(Bitfield); -assert_send_and_sync!{KeyFlags} +assert_send_and_sync!(KeyFlags); impl fmt::Debug for KeyFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { diff --git a/openpgp/src/types/server_preferences.rs b/openpgp/src/types/server_preferences.rs index 06813b37..94c49776 100644 --- a/openpgp/src/types/server_preferences.rs +++ b/openpgp/src/types/server_preferences.rs @@ -56,7 +56,7 @@ use crate::types::Bitfield; /// ``` #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct KeyServerPreferences(Bitfield); -assert_send_and_sync!{KeyServerPreferences} +assert_send_and_sync!(KeyServerPreferences); impl fmt::Debug for KeyServerPreferences { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { diff --git a/openpgp/src/types/timestamp.rs b/openpgp/src/types/timestamp.rs index c34ff1cd..90fa4980 100644 --- a/openpgp/src/types/timestamp.rs +++ b/openpgp/src/types/timestamp.rs @@ -63,7 +63,7 @@ use crate::{ /// [`Timestamp::round_down`]: ../types/struct.Timestamp.html#method.round_down #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct Timestamp(u32); -assert_send_and_sync!{Timestamp} +assert_send_and_sync!(Timestamp); impl From for u32 { fn from(t: Timestamp) -> Self { @@ -281,7 +281,7 @@ impl Arbitrary for Timestamp { /// ``` #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct Duration(u32); -assert_send_and_sync!{Duration} +assert_send_and_sync!(Duration); impl From for u32 { fn from(d: Duration) -> Self { -- cgit v1.2.3