Skip to content

Commit

Permalink
Code reformat.
Browse files Browse the repository at this point in the history
  • Loading branch information
keuin committed Mar 28, 2022
1 parent c8f197b commit c328eb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/bot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
};
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c328eb5

Please sign in to comment.