From 3192e8fed28d4e7a52bacb36747e55eeba86bfe6 Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Thu, 6 Mar 2025 10:31:45 +0100 Subject: [PATCH] Add a test to check that RoTxn/RwTxn is Send --- heed/src/txn.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/heed/src/txn.rs b/heed/src/txn.rs index 1570fc4a..242c424c 100644 --- a/heed/src/txn.rs +++ b/heed/src/txn.rs @@ -335,3 +335,24 @@ impl std::ops::DerefMut for RwTxn<'_> { &mut self.txn } } + +#[cfg(test)] +mod tests { + #[test] + fn ro_txns_are_send() { + use crate::{RoTxn, WithoutTls}; + + fn is_send() {} + + is_send::>(); + } + + #[test] + fn rw_txns_are_send() { + use crate::RwTxn; + + fn is_send() {} + + is_send::(); + } +}