diff --git a/src/executor/delete.rs b/src/executor/delete.rs index 2fa5f64a..c4a8c7de 100644 --- a/src/executor/delete.rs +++ b/src/executor/delete.rs @@ -18,7 +18,7 @@ impl<'a, A: 'a> DeleteOne where A: ActiveModelTrait, { - pub fn exec(self, db: &'a C) -> impl Future> + 'a + pub fn exec(self, db: &'a C) -> impl Future> + '_ where C: ConnectionTrait<'a>, { @@ -31,7 +31,7 @@ impl<'a, E> DeleteMany where E: EntityTrait, { - pub fn exec(self, db: &'a C) -> impl Future> + 'a + pub fn exec(self, db: &'a C) -> impl Future> + '_ where C: ConnectionTrait<'a>, { @@ -61,8 +61,7 @@ where Deleter::new(query).exec(db).await } -// Only Statement impl Send -async fn exec_delete<'a, C>(statement: Statement, db: &C) -> Result +async fn exec_delete<'a, C>(statement: Statement, db: &'a C) -> Result where C: ConnectionTrait<'a>, { diff --git a/src/executor/insert.rs b/src/executor/insert.rs index e7437854..b4da10c0 100644 --- a/src/executor/insert.rs +++ b/src/executor/insert.rs @@ -28,7 +28,7 @@ where A: ActiveModelTrait, { #[allow(unused_mut)] - pub fn exec<'a, C>(self, db: &'a C) -> impl Future, DbErr>> + 'a + pub fn exec<'a, C>(self, db: &'a C) -> impl Future, DbErr>> + '_ where C: ConnectionTrait<'a>, A: 'a, @@ -61,7 +61,7 @@ where } } - pub fn exec<'a, C>(self, db: &'a C) -> impl Future, DbErr>> + 'a + pub fn exec<'a, C>(self, db: &'a C) -> impl Future, DbErr>> + '_ where C: ConnectionTrait<'a>, A: 'a, @@ -71,7 +71,6 @@ where } } -// Only Statement impl Send async fn exec_insert<'a, A, C>( primary_key: Option, statement: Statement, diff --git a/src/executor/update.rs b/src/executor/update.rs index 3fb4a5c8..c228730b 100644 --- a/src/executor/update.rs +++ b/src/executor/update.rs @@ -32,7 +32,7 @@ impl<'a, E> UpdateMany where E: EntityTrait, { - pub fn exec(self, db: &'a C) -> impl Future> + 'a + pub fn exec(self, db: &'a C) -> impl Future> + '_ where C: ConnectionTrait<'a>, { @@ -83,7 +83,6 @@ where Ok(model) } -// Only Statement impl Send async fn exec_update<'a, C>( statement: Statement, db: &'a C,