summaryrefslogtreecommitdiff
path: root/src/bot.rs
diff options
context:
space:
mode:
authorKeuin <[email protected]>2022-03-27 22:41:17 +0800
committerKeuin <[email protected]>2022-03-28 00:11:45 +0800
commitab4b8903ee9b009c3e1a188f1cfe09e39272d2ee (patch)
tree47ae9f9fcede53722a7761db00c0bec462aad1c5 /src/bot.rs
parentc4d5507e9c0b16b0d34df9e871be1d76d296ecea (diff)
Close database gracefully when shutting down.
Diffstat (limited to 'src/bot.rs')
-rw-r--r--src/bot.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bot.rs b/src/bot.rs
index b1a4ea2..9ea2c3a 100644
--- a/src/bot.rs
+++ b/src/bot.rs
@@ -58,6 +58,6 @@ pub async fn repl(bot: Bot, db: Arc<database::DbPool>) {
teloxide::repls2::commands_repl(
bot.auto_send(),
move |bot, msg, cmd|
- answer(bot, msg, cmd, Arc::clone(&db)), Command::ty(),
+ answer(bot, msg, cmd, db.clone()), Command::ty(),
).await;
}