From ab4b8903ee9b009c3e1a188f1cfe09e39272d2ee Mon Sep 17 00:00:00 2001 From: Keuin Date: Sun, 27 Mar 2022 22:41:17 +0800 Subject: Close database gracefully when shutting down. --- src/bot.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bot.rs') 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) { 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; } -- cgit v1.2.3