Skip to content

Commit e0a1f16

Browse files
authored
Removed Send bound from arg binding (#2960)
1 parent b607251 commit e0a1f16

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

sqlx-core/src/any/arguments.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ impl<'q> Arguments<'q> for AnyArguments<'q> {
1818

1919
fn add<T>(&mut self, value: T)
2020
where
21-
T: 'q + Send + Encode<'q, Self::Database> + Type<Self::Database>,
21+
T: 'q + Encode<'q, Self::Database> + Type<Self::Database>,
2222
{
2323
let _ = value.encode(&mut self.values);
2424
}

sqlx-core/src/arguments.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub trait Arguments<'q>: Send + Sized + Default {
1616
/// Add the value to the end of the arguments.
1717
fn add<T>(&mut self, value: T)
1818
where
19-
T: 'q + Send + Encode<'q, Self::Database> + Type<Self::Database>;
19+
T: 'q + Encode<'q, Self::Database> + Type<Self::Database>;
2020

2121
fn format_placeholder<W: Write>(&self, writer: &mut W) -> fmt::Result {
2222
writer.write_str("?")

sqlx-core/src/query.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ impl<'q, DB: Database> Query<'q, DB, <DB as Database>::Arguments<'q>> {
7878
///
7979
/// There is no validation that the value is of the type expected by the query. Most SQL
8080
/// flavors will perform type coercion (Postgres will return a database error).
81-
pub fn bind<T: 'q + Send + Encode<'q, DB> + Type<DB>>(mut self, value: T) -> Self {
81+
pub fn bind<T: 'q + Encode<'q, DB> + Type<DB>>(mut self, value: T) -> Self {
8282
if let Some(arguments) = &mut self.arguments {
8383
arguments.add(value);
8484
}

sqlx-core/src/query_as.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl<'q, DB: Database, O> QueryAs<'q, DB, O, <DB as Database>::Arguments<'q>> {
5151
/// Bind a value for use with this SQL query.
5252
///
5353
/// See [`Query::bind`](Query::bind).
54-
pub fn bind<T: 'q + Send + Encode<'q, DB> + Type<DB>>(mut self, value: T) -> Self {
54+
pub fn bind<T: 'q + Encode<'q, DB> + Type<DB>>(mut self, value: T) -> Self {
5555
self.inner = self.inner.bind(value);
5656
self
5757
}

sqlx-core/src/query_builder.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ where
147147
/// [postgres-limit-issue]: https://github.com/launchbadge/sqlx/issues/671#issuecomment-687043510
148148
pub fn push_bind<T>(&mut self, value: T) -> &mut Self
149149
where
150-
T: 'args + Encode<'args, DB> + Send + Type<DB>,
150+
T: 'args + Encode<'args, DB> + Type<DB>,
151151
{
152152
self.sanity_check();
153153

@@ -569,7 +569,7 @@ where
569569
/// See [`QueryBuilder::push_bind()`] for details.
570570
pub fn push_bind<T>(&mut self, value: T) -> &mut Self
571571
where
572-
T: 'args + Encode<'args, DB> + Send + Type<DB>,
572+
T: 'args + Encode<'args, DB> + Type<DB>,
573573
{
574574
if self.push_separator {
575575
self.query_builder.push(&self.separator);
@@ -587,7 +587,7 @@ where
587587
/// Simply calls [`QueryBuilder::push_bind()`] directly.
588588
pub fn push_bind_unseparated<T>(&mut self, value: T) -> &mut Self
589589
where
590-
T: 'args + Encode<'args, DB> + Send + Type<DB>,
590+
T: 'args + Encode<'args, DB> + Type<DB>,
591591
{
592592
self.query_builder.push_bind(value);
593593
self

sqlx-core/src/query_scalar.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl<'q, DB: Database, O> QueryScalar<'q, DB, O, <DB as Database>::Arguments<'q>
4848
/// Bind a value for use with this SQL query.
4949
///
5050
/// See [`Query::bind`](crate::query::Query::bind).
51-
pub fn bind<T: 'q + Send + Encode<'q, DB> + Type<DB>>(mut self, value: T) -> Self {
51+
pub fn bind<T: 'q + Encode<'q, DB> + Type<DB>>(mut self, value: T) -> Self {
5252
self.inner = self.inner.bind(value);
5353
self
5454
}

0 commit comments

Comments
 (0)