mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-11 00:00:25 +02:00
Update to latest sqlx in example (#2099)
This commit is contained in:
@@ -93,11 +93,10 @@ where
|
||||
}
|
||||
|
||||
async fn using_connection_extractor(
|
||||
DatabaseConnection(conn): DatabaseConnection,
|
||||
DatabaseConnection(mut conn): DatabaseConnection,
|
||||
) -> Result<String, (StatusCode, String)> {
|
||||
let mut conn = conn;
|
||||
sqlx::query_scalar("select 'hello world from pg'")
|
||||
.fetch_one(&mut conn)
|
||||
.fetch_one(&mut *conn)
|
||||
.await
|
||||
.map_err(internal_error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user