Replies: 1 comment 4 replies
-
Command::repl(bot, move |bot, msg, cmd| {
let db_client = db_client.clone();
answer(bot, msg, cmd, db_client)
}).await; Should probably work. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone, I have a
establish_db_connection
function which returns atokio_postgres::Client
. I tried to pass this to the repl withWhere
db_client
is thetokio_postgres::Client
.answer
is defined asI get the following error:
I read the other very similar discussions which suggested to borrow the client, but that results in
Thanks for the help!
Beta Was this translation helpful? Give feedback.
All reactions