From 6ef5bbe3ed68e40f2748388e0bf698a866620490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 15 Sep 2022 15:18:21 +0200 Subject: [PATCH] Add a test that make sure Error is Send + Sync --- heed/src/lib.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/heed/src/lib.rs b/heed/src/lib.rs index 14d2fc50..a651044e 100644 --- a/heed/src/lib.rs +++ b/heed/src/lib.rs @@ -124,3 +124,16 @@ impl From for Error { } pub type Result = result::Result; + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn error_is_send_sync() { + fn give_me_send_sync(_: T) {} + + let error = Error::Encoding(Box::from("There is an issue, you know?")); + give_me_send_sync(error); + } +}