Can't clone sqlx::Pool
#1709
Answered
by
abonander
stanley355
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
abonander
Feb 16, 2022
Replies: 1 comment 1 reply
-
Have a look at this line in your code:
The Rust Programming Language book has a chapter on this: https://doc.rust-lang.org/book/ch09-02-recoverable-errors-with-result.html |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
abonander
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have a look at this line in your code:
connect()
is anasync fn
returningsqlx::Result<Pool>
. You have to extract thePool
from thatResult
to use it.The Rust Programming Language book has a chapter on this: https://doc.rust-lang.org/book/ch09-02-recoverable-errors-with-result.html