implement Clone for Arc<Mutex> types

This commit is contained in:
Peter Hayman
2025-04-28 00:22:39 +10:00
parent bde2d4f0a3
commit 29d463aa89

View File

@@ -129,6 +129,14 @@ pub struct Statement {
inner: Arc<Mutex<limbo_core::Statement>>,
}
impl Clone for Statement {
fn clone(&self) -> Self {
Self {
inner: Arc::clone(&self.inner),
}
}
}
unsafe impl Send for Statement {}
unsafe impl Sync for Statement {}
@@ -241,6 +249,14 @@ pub struct Rows {
inner: Arc<Mutex<limbo_core::Statement>>,
}
impl Clone for Rows {
fn clone(&self) -> Self {
Self {
inner: Arc::clone(&self.inner),
}
}
}
unsafe impl Send for Rows {}
unsafe impl Sync for Rows {}