summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bot.rs3
-rw-r--r--src/main.rs4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/bot.rs b/src/bot.rs
index d60bc6f..e663360 100644
--- a/src/bot.rs
+++ b/src/bot.rs
@@ -53,7 +53,8 @@ async fn answer(bot: AutoSend<Bot>, message: Message, command: Command, db: DbPo
let message =
match database::get_user_by_chat_id(&db, chat_id as u64).await {
Ok(u) => match u {
- Some(user) => format!("Your token is `{}`. Treat it as a secret!", user.token),
+ Some(user) =>
+ format!("Your token is `{}`. Treat it as a secret!", user.token),
_ => String::from("Error: cannot fetch token.")
},
Err(why) => {
diff --git a/src/main.rs b/src/main.rs
index e0cc8cc..1c1bd48 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -45,7 +45,7 @@ async fn main() {
Ok(l) => l,
Err(_) => {
eprintln!("Invalid log level: {}. Use {:?} instead.",
- config.log_level, DEFAULT_LOG_LEVEL);
+ config.log_level, DEFAULT_LOG_LEVEL);
DEFAULT_LOG_LEVEL
}
};
@@ -88,7 +88,7 @@ async fn main() {
debug!("Waiting for Ctrl-C in main coroutine...");
tokio::signal::ctrl_c().await.unwrap();
-
+
// gracefully shutdown the database connection
info!("Closing database...");
db.close().await;