summaryrefslogtreecommitdiffstats
path: root/openpgp/src/packet_pile.rs
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2020-12-04 20:06:17 +0100
committerAzul <azul@riseup.net>2020-12-08 10:35:58 +0100
commitb956d36cb50cac28aa9da0e373fb33c9a4c120af (patch)
treec20bb42230aed97494b6abe494bc8e22053f58a6 /openpgp/src/packet_pile.rs
parent4a971af5abe70d41485df141a3d9fa97eaab5f1c (diff)
openpgp: Ensure public types are Send and Sync.
- See #627.
Diffstat (limited to 'openpgp/src/packet_pile.rs')
-rw-r--r--openpgp/src/packet_pile.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/openpgp/src/packet_pile.rs b/openpgp/src/packet_pile.rs
index 259716d6..3df9581a 100644
--- a/openpgp/src/packet_pile.rs
+++ b/openpgp/src/packet_pile.rs
@@ -113,6 +113,8 @@ pub struct PacketPile {
top_level: Container,
}
+assert_send_and_sync!{PacketPile}
+
impl fmt::Debug for PacketPile {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("PacketPile")
@@ -1122,10 +1124,4 @@ mod test {
assert!(pile.replace(&[ 0, 0 ], 0, Vec::new()).is_ok());
assert!(pile.replace(&[ 0, 1 ], 0, Vec::new()).is_err());
}
-
- #[test]
- fn packet_pile_is_send_and_sync() {
- fn f<T: Send + Sync>(_: T) {}
- f(PacketPile::from(vec![]));
- }
}