Skip to content

Commit 3d02fa8

Browse files
authored
Assert impl Send+Sync for Graph and Txn (#153)
1 parent 6c9ba46 commit 3d02fa8

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

lib/src/graph.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,8 @@ impl Graph {
9292
q.execute(db, self.config.fetch_size, connection).await
9393
}
9494
}
95+
96+
const _: () = {
97+
const fn assert_send_sync<T: ?Sized + Send + Sync>() {}
98+
assert_send_sync::<Graph>();
99+
};

lib/src/txn.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ impl Txn {
7979
}
8080
}
8181

82+
const _: () = {
83+
const fn assert_send_sync<T: ?Sized + Send + Sync>() {}
84+
assert_send_sync::<Txn>();
85+
};
86+
8287
pub trait TransactionHandle: private::Handle {}
8388

8489
impl TransactionHandle for Txn {}

0 commit comments

Comments
 (0)