summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-11-23 10:10:28 +0100
committerJustus Winter <justus@sequoia-pgp.org>2020-11-24 13:28:56 +0100
commit62daf15a2117039e007b77b8201dad6c8dc4e7fa (patch)
tree4bd9095014f086ce928d8b74a19aeaa4ca7f28aa
parent7c84dc3da91ee80a273834eeee45588e0e81d5cc (diff)
openpgp: Assert that Error is Send + Sync.
- See #615.
-rw-r--r--openpgp/src/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/openpgp/src/lib.rs b/openpgp/src/lib.rs
index bb143d2f..8e3dee31 100644
--- a/openpgp/src/lib.rs
+++ b/openpgp/src/lib.rs
@@ -298,3 +298,9 @@ pub enum Error {
.unwrap_or("".into()))]
PolicyViolation(String, Option<std::time::SystemTime>),
}
+
+#[test]
+fn error_is_send_and_sync() {
+ fn f<T: Send + Sync>(_: T) {}
+ f(Error::IndexOutOfRange);
+}