From 29d463aa89c9cf633bf026741ab36818fad5d616 Mon Sep 17 00:00:00 2001 From: Peter Hayman Date: Mon, 28 Apr 2025 00:22:39 +1000 Subject: [PATCH] implement Clone for Arc types --- bindings/rust/src/lib.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/bindings/rust/src/lib.rs b/bindings/rust/src/lib.rs index 8c57e7909..783012c5d 100644 --- a/bindings/rust/src/lib.rs +++ b/bindings/rust/src/lib.rs @@ -129,6 +129,14 @@ pub struct Statement { inner: Arc>, } +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>, } +impl Clone for Rows { + fn clone(&self) -> Self { + Self { + inner: Arc::clone(&self.inner), + } + } +} + unsafe impl Send for Rows {} unsafe impl Sync for Rows {}