From 983a71c4702fa942feabb72dd4a7140e81162425 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Wed, 25 Sep 2019 18:39:51 -0700 Subject: [PATCH] Fix postgres --- postgres/src/client.rs | 10 +++++----- postgres/src/transaction.rs | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/postgres/src/client.rs b/postgres/src/client.rs index bb53e0a7..4cf088a7 100644 --- a/postgres/src/client.rs +++ b/postgres/src/client.rs @@ -80,7 +80,7 @@ impl Client { /// # Ok(()) /// # } /// ``` - pub fn execute(&mut self, query: &T, params: &[&dyn ToSql]) -> Result + pub fn execute(&mut self, query: &T, params: &[&(dyn ToSql + Sync)]) -> Result where T: ?Sized + ToStatement, { @@ -119,7 +119,7 @@ impl Client { /// # Ok(()) /// # } /// ``` - pub fn query(&mut self, query: &T, params: &[&dyn ToSql]) -> Result, Error> + pub fn query(&mut self, query: &T, params: &[&(dyn ToSql + Sync)]) -> Result, Error> where T: ?Sized + ToStatement, { @@ -155,7 +155,7 @@ impl Client { pub fn query_iter<'a, T>( &'a mut self, query: &T, - params: &[&dyn ToSql], + params: &[&(dyn ToSql + Sync)], ) -> Result + 'a, Error> where T: ?Sized + ToStatement, @@ -242,7 +242,7 @@ impl Client { pub fn copy_in( &mut self, query: &T, - params: &[&dyn ToSql], + params: &[&(dyn ToSql + Sync)], reader: R, ) -> Result where @@ -275,7 +275,7 @@ impl Client { pub fn copy_out<'a, T>( &'a mut self, query: &T, - params: &[&dyn ToSql], + params: &[&(dyn ToSql + Sync)], ) -> Result where T: ?Sized + ToStatement, diff --git a/postgres/src/transaction.rs b/postgres/src/transaction.rs index 65ac5176..9ecbe75f 100644 --- a/postgres/src/transaction.rs +++ b/postgres/src/transaction.rs @@ -43,7 +43,7 @@ impl<'a> Transaction<'a> { } /// Like `Client::execute`. - pub fn execute(&mut self, query: &T, params: &[&dyn ToSql]) -> Result + pub fn execute(&mut self, query: &T, params: &[&(dyn ToSql + Sync)]) -> Result where T: ?Sized + ToStatement, { @@ -52,7 +52,7 @@ impl<'a> Transaction<'a> { } /// Like `Client::query`. - pub fn query(&mut self, query: &T, params: &[&dyn ToSql]) -> Result, Error> + pub fn query(&mut self, query: &T, params: &[&(dyn ToSql + Sync)]) -> Result, Error> where T: ?Sized + ToStatement, { @@ -63,7 +63,7 @@ impl<'a> Transaction<'a> { pub fn query_iter( &mut self, query: &T, - params: &[&dyn ToSql], + params: &[&(dyn ToSql + Sync)], ) -> Result, Error> where T: ?Sized + ToStatement, @@ -82,7 +82,7 @@ impl<'a> Transaction<'a> { /// # Panics /// /// Panics if the number of parameters provided does not match the number expected. - pub fn bind(&mut self, query: &T, params: &[&dyn ToSql]) -> Result + pub fn bind(&mut self, query: &T, params: &[&(dyn ToSql + Sync)]) -> Result where T: ?Sized + ToStatement, { @@ -112,7 +112,7 @@ impl<'a> Transaction<'a> { pub fn copy_in( &mut self, query: &T, - params: &[&dyn ToSql], + params: &[&(dyn ToSql + Sync)], reader: R, ) -> Result where @@ -127,7 +127,7 @@ impl<'a> Transaction<'a> { pub fn copy_out<'b, T>( &'a mut self, query: &T, - params: &[&dyn ToSql], + params: &[&(dyn ToSql + Sync)], ) -> Result where T: ?Sized + ToStatement,