mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-02 23:35:20 +00:00
Update issue_104 test to use map instead of try_map
This commit is contained in:
parent
d3b7a0783e
commit
7ebd362453
@ -216,8 +216,8 @@ async fn it_can_return_interleaved_nulls_issue_104() -> anyhow::Result<()> {
|
|||||||
let mut conn = new::<Postgres>().await?;
|
let mut conn = new::<Postgres>().await?;
|
||||||
|
|
||||||
let tuple = sqlx::query("SELECT NULL, 10::INT, NULL, 20::INT, NULL, 40::INT, NULL, 80::INT")
|
let tuple = sqlx::query("SELECT NULL, 10::INT, NULL, 20::INT, NULL, 40::INT, NULL, 80::INT")
|
||||||
.try_map(|row: PgRow| {
|
.map(|row: PgRow| {
|
||||||
Ok((
|
(
|
||||||
row.get::<Option<i32>, _>(0),
|
row.get::<Option<i32>, _>(0),
|
||||||
row.get::<Option<i32>, _>(1),
|
row.get::<Option<i32>, _>(1),
|
||||||
row.get::<Option<i32>, _>(2),
|
row.get::<Option<i32>, _>(2),
|
||||||
@ -226,7 +226,7 @@ async fn it_can_return_interleaved_nulls_issue_104() -> anyhow::Result<()> {
|
|||||||
row.get::<Option<i32>, _>(5),
|
row.get::<Option<i32>, _>(5),
|
||||||
row.get::<Option<i32>, _>(6),
|
row.get::<Option<i32>, _>(6),
|
||||||
row.get::<Option<i32>, _>(7),
|
row.get::<Option<i32>, _>(7),
|
||||||
))
|
)
|
||||||
})
|
})
|
||||||
.fetch_one(&mut conn)
|
.fetch_one(&mut conn)
|
||||||
.await?;
|
.await?;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user