Skip to content

Commit 983a71c

Browse files
committed
Fix postgres
1 parent 427340d commit 983a71c

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

postgres/src/client.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl Client {
8080
/// # Ok(())
8181
/// # }
8282
/// ```
83-
pub fn execute<T>(&mut self, query: &T, params: &[&dyn ToSql]) -> Result<u64, Error>
83+
pub fn execute<T>(&mut self, query: &T, params: &[&(dyn ToSql + Sync)]) -> Result<u64, Error>
8484
where
8585
T: ?Sized + ToStatement,
8686
{
@@ -119,7 +119,7 @@ impl Client {
119119
/// # Ok(())
120120
/// # }
121121
/// ```
122-
pub fn query<T>(&mut self, query: &T, params: &[&dyn ToSql]) -> Result<Vec<Row>, Error>
122+
pub fn query<T>(&mut self, query: &T, params: &[&(dyn ToSql + Sync)]) -> Result<Vec<Row>, Error>
123123
where
124124
T: ?Sized + ToStatement,
125125
{
@@ -155,7 +155,7 @@ impl Client {
155155
pub fn query_iter<'a, T>(
156156
&'a mut self,
157157
query: &T,
158-
params: &[&dyn ToSql],
158+
params: &[&(dyn ToSql + Sync)],
159159
) -> Result<impl FallibleIterator<Item = Row, Error = Error> + 'a, Error>
160160
where
161161
T: ?Sized + ToStatement,
@@ -242,7 +242,7 @@ impl Client {
242242
pub fn copy_in<T, R>(
243243
&mut self,
244244
query: &T,
245-
params: &[&dyn ToSql],
245+
params: &[&(dyn ToSql + Sync)],
246246
reader: R,
247247
) -> Result<u64, Error>
248248
where
@@ -275,7 +275,7 @@ impl Client {
275275
pub fn copy_out<'a, T>(
276276
&'a mut self,
277277
query: &T,
278-
params: &[&dyn ToSql],
278+
params: &[&(dyn ToSql + Sync)],
279279
) -> Result<impl BufRead + 'a, Error>
280280
where
281281
T: ?Sized + ToStatement,

postgres/src/transaction.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl<'a> Transaction<'a> {
4343
}
4444

4545
/// Like `Client::execute`.
46-
pub fn execute<T>(&mut self, query: &T, params: &[&dyn ToSql]) -> Result<u64, Error>
46+
pub fn execute<T>(&mut self, query: &T, params: &[&(dyn ToSql + Sync)]) -> Result<u64, Error>
4747
where
4848
T: ?Sized + ToStatement,
4949
{
@@ -52,7 +52,7 @@ impl<'a> Transaction<'a> {
5252
}
5353

5454
/// Like `Client::query`.
55-
pub fn query<T>(&mut self, query: &T, params: &[&dyn ToSql]) -> Result<Vec<Row>, Error>
55+
pub fn query<T>(&mut self, query: &T, params: &[&(dyn ToSql + Sync)]) -> Result<Vec<Row>, Error>
5656
where
5757
T: ?Sized + ToStatement,
5858
{
@@ -63,7 +63,7 @@ impl<'a> Transaction<'a> {
6363
pub fn query_iter<T>(
6464
&mut self,
6565
query: &T,
66-
params: &[&dyn ToSql],
66+
params: &[&(dyn ToSql + Sync)],
6767
) -> Result<impl FallibleIterator<Item = Row, Error = Error>, Error>
6868
where
6969
T: ?Sized + ToStatement,
@@ -82,7 +82,7 @@ impl<'a> Transaction<'a> {
8282
/// # Panics
8383
///
8484
/// Panics if the number of parameters provided does not match the number expected.
85-
pub fn bind<T>(&mut self, query: &T, params: &[&dyn ToSql]) -> Result<Portal, Error>
85+
pub fn bind<T>(&mut self, query: &T, params: &[&(dyn ToSql + Sync)]) -> Result<Portal, Error>
8686
where
8787
T: ?Sized + ToStatement,
8888
{
@@ -112,7 +112,7 @@ impl<'a> Transaction<'a> {
112112
pub fn copy_in<T, R>(
113113
&mut self,
114114
query: &T,
115-
params: &[&dyn ToSql],
115+
params: &[&(dyn ToSql + Sync)],
116116
reader: R,
117117
) -> Result<u64, Error>
118118
where
@@ -127,7 +127,7 @@ impl<'a> Transaction<'a> {
127127
pub fn copy_out<'b, T>(
128128
&'a mut self,
129129
query: &T,
130-
params: &[&dyn ToSql],
130+
params: &[&(dyn ToSql + Sync)],
131131
) -> Result<impl BufRead + 'b, Error>
132132
where
133133
T: ?Sized + ToStatement,

0 commit comments

Comments
 (0)