diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-11-23 10:10:28 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-11-24 13:28:56 +0100 |
commit | 62daf15a2117039e007b77b8201dad6c8dc4e7fa (patch) | |
tree | 4bd9095014f086ce928d8b74a19aeaa4ca7f28aa /openpgp/src/lib.rs | |
parent | 7c84dc3da91ee80a273834eeee45588e0e81d5cc (diff) |
openpgp: Assert that Error is Send + Sync.
- See #615.
Diffstat (limited to 'openpgp/src/lib.rs')
-rw-r--r-- | openpgp/src/lib.rs | 6 |
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); +} |