Replies: 1 comment
-
Looks like this issue is tracking updating that example: #2368 Instead of |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am very, very new to Rust and would appreciate a little help with the issue below. I have migrations and fixtures working, but can only get my test to compile using a workaround (more down below).
I am following this page in the docs: https://docs.rs/sqlx/latest/sqlx/attr.test.html
The line
.fetch_one(&mut conn)
has a compiler error:I can get this compile (and the test works correctly) if I make this update suggested by Copilot:
Playing around a bit more I also got it to compile with this:
But these don't match the documentation. Did I miss something along the way? Is the
as_mut()
ok to use or are there issues?My toml file for reference (I am on nightly):
I tried adding futures (saw it in a video) to see if that was the issue and it didn't resolve it. I also tried the
pool: PoolConnection<Postgres>
arg forbasic_test
and also didn't past this.Aside: having documentation be example based is a great help.
Thanks,
Robert
Beta Was this translation helpful? Give feedback.
All reactions