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
When trying to use Acquire and passing in a transaction inside an axum handler I get the following lifetime error:
error: implementation of `sqlx::Acquire` is not general enough
--> src/lib.rs:10:9
|
10 | get(|| async move {
| ^^^ implementation of `sqlx::Acquire` is not general enough
|
= note: `sqlx::Acquire<'1>` would have to be implemented for the type `&'0 mut Transaction<'_, Postgres>`, for any two lifetimes `'0` and `'1`...
= note: ...but `sqlx::Acquire<'2>` is actually implemented for the type `&'2 mut Transaction<'_, Postgres>`, for some specific lifetime `'2`
When trying to use
Acquire
and passing in a transaction inside an axum handler I get the following lifetime error:Executable example: https://github.com/stoically/sqlx-axum-acquire-issue/blob/main/src/lib.rs
The text was updated successfully, but these errors were encountered: