diff --git a/sqlx-core/src/arguments.rs b/sqlx-core/src/arguments.rs index 13b4e78b..d484f12e 100644 --- a/sqlx-core/src/arguments.rs +++ b/sqlx-core/src/arguments.rs @@ -15,7 +15,7 @@ pub trait Arguments<'q>: Send + Sized + Default { /// Add the value to the end of the arguments. fn add(&mut self, value: T) where - T: 'q + Encode<'q, Self::Database> + Type; + T: 'q + Send + Encode<'q, Self::Database> + Type; } pub trait IntoArguments<'q, DB: HasArguments<'q>>: Sized + Send { diff --git a/sqlx-core/src/query.rs b/sqlx-core/src/query.rs index afefeece..84e4f29c 100644 --- a/sqlx-core/src/query.rs +++ b/sqlx-core/src/query.rs @@ -58,7 +58,7 @@ impl<'q, DB: Database> Query<'q, DB, >::Arguments> { /// /// There is no validation that the value is of the type expected by the query. Most SQL /// flavors will perform type coercion (Postgres will return a database error). - pub fn bind + Type>(mut self, value: T) -> Self { + pub fn bind + Type>(mut self, value: T) -> Self { if let Some(arguments) = &mut self.arguments { arguments.add(value); } diff --git a/sqlx-core/src/query_as.rs b/sqlx-core/src/query_as.rs index fed5e321..e70178be 100644 --- a/sqlx-core/src/query_as.rs +++ b/sqlx-core/src/query_as.rs @@ -41,7 +41,7 @@ impl<'q, DB: Database, O> QueryAs<'q, DB, O, >::Arguments /// Bind a value for use with this SQL query. /// /// See [`Query::bind`](crate::query::Query::bind). - pub fn bind + Type>(mut self, value: T) -> Self { + pub fn bind + Type>(mut self, value: T) -> Self { self.inner = self.inner.bind(value); self } diff --git a/sqlx-core/src/query_scalar.rs b/sqlx-core/src/query_scalar.rs index e12104b4..b3ee3d68 100644 --- a/sqlx-core/src/query_scalar.rs +++ b/sqlx-core/src/query_scalar.rs @@ -37,7 +37,7 @@ impl<'q, DB: Database, O> QueryScalar<'q, DB, O, >::Argum /// Bind a value for use with this SQL query. /// /// See [`Query::bind`](crate::query::Query::bind). - pub fn bind + Type>(mut self, value: T) -> Self { + pub fn bind + Type>(mut self, value: T) -> Self { self.inner = self.inner.bind(value); self }