From 6f963c91e69f7674e92a5dd6efcdd24aba80d747 Mon Sep 17 00:00:00 2001 From: Santo Cariotti <santo@dcariotti.me> Date: Tue, 12 Oct 2021 21:34:19 +0200 Subject: [PATCH] Remove async on make keyboard function --- examples/buttons/src/commands.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/buttons/src/commands.rs b/examples/buttons/src/commands.rs index 011eab6a..12b1fd1a 100644 --- a/examples/buttons/src/commands.rs +++ b/examples/buttons/src/commands.rs @@ -16,7 +16,7 @@ pub enum Command { } /// Creates a keyboard made by buttons in a big column. -async fn make_keyboard(chat_id: i64) -> InlineKeyboardMarkup { +fn make_keyboard(chat_id: i64) -> InlineKeyboardMarkup { let mut keyboard_array: Vec<Vec<InlineKeyboardButton>> = vec![]; // The column is made by the list of Debian versions. let debian_versions = vec![ @@ -50,7 +50,7 @@ pub async fn handler( cx.answer(Command::descriptions()).await?; } Command::Start => { - let keyboard = make_keyboard(cx.chat_id()).await; + let keyboard = make_keyboard(cx.chat_id()); // Create a list of buttons using callbacks to receive the response. cx.answer("Debian versions:").reply_markup(keyboard).await?; }