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/fingerprint.rs | |
parent | 4a971af5abe70d41485df141a3d9fa97eaab5f1c (diff) |
openpgp: Ensure public types are Send and Sync.
- See #627.
Diffstat (limited to 'openpgp/src/fingerprint.rs')
-rw-r--r-- | openpgp/src/fingerprint.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/openpgp/src/fingerprint.rs b/openpgp/src/fingerprint.rs index 3af4a70e..bd6d0ffe 100644 --- a/openpgp/src/fingerprint.rs +++ b/openpgp/src/fingerprint.rs @@ -53,6 +53,7 @@ pub enum Fingerprint { /// V3 fingerprint (deprecated) or otherwise wrong-length data. Invalid(Box<[u8]>), } +assert_send_and_sync!{Fingerprint} impl fmt::Display for Fingerprint { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -331,11 +332,4 @@ mod tests { assert_eq!(format!("{:X}", fp), "0123456789ABCDEF0123456789ABCDEF01234567"); assert_eq!(format!("{:x}", fp), "0123456789abcdef0123456789abcdef01234567"); } - - #[test] - fn fingerprint_is_send_and_sync() { - fn f<T: Send + Sync>(_: T) {} - f("0123 4567 89AB CDEF 0123 4567 89AB CDEF 0123 4567" - .parse::<Fingerprint>().unwrap()); - } } |