From 85495e8a9642fb6f80fccdc7c97ecdedb83ce813 Mon Sep 17 00:00:00 2001 From: tomaka Date: Wed, 30 Nov 2016 12:53:32 +0100 Subject: [PATCH] Implement Send for Connection --- src/connection.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/connection.rs b/src/connection.rs index 4123938..e5bf293 100644 --- a/src/connection.rs +++ b/src/connection.rs @@ -12,6 +12,8 @@ pub struct Connection { phantom: PhantomData, } +unsafe impl Send for Connection {} + impl Connection { /// Open a connection to a new or existing database. pub fn open>(path: T) -> Result { @@ -65,7 +67,7 @@ impl Connection { /// due to processing of some other request. If the callback returns `true`, /// the operation will be repeated. pub fn set_busy_handler(&mut self, callback: F) -> Result<()> - where F: FnMut(usize) -> bool + 'static + where F: FnMut(usize) -> bool + Send + 'static { try!(self.remove_busy_handler()); unsafe {