You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
the trait bound &mut Transaction<'_, Sqlite>: Executor<'_> is not satisfied #2606
error[E0277]: the trait bound `&mut Transaction<'_, Sqlite>: Executor<'_>` is not satisfied
--> file.rs:584:18
|
584 | .execute(&mut tx)
| ------- ^^^^^^^ the trait `Executor<'_>` is not implemented for `&mut Transaction<'_, Sqlite>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `Executor<'c>`:
<&'c mut AnyConnection as Executor<'c>>
<&'c mut SqliteConnection as Executor<'c>>
<&Pool<DB> as Executor<'p>>
note: required by a bound in `sqlx::query::Query::<'q, DB, A>::execute`
--> /Users/alimehasin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-core-0.7.0/src/query.rs:151:12
|
151 | E: Executor<'c, Database = DB>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Query::<'q, DB, A>::execute`
The Executor impls for Transaction and PoolConnection have been deleted because they cannot exist in the new crate architecture without rewriting the Executor trait entirely.
To fix this breakage, simply add a dereference where an impl Executor is expected, as they both dereference to the inner connection type which will still implement it:
&mut transaction -> &mut *transaction
&mut connection -> &mut *connection
Reacted by Anatolii Kurotych, Yehuthi, HugoxSaraiva and Unic
Activity
alimehasin commentedon Jul 10, 2023
My bad, its mention in the CHANGELOG
Upgrade sqlx to latest (0.7.2)