diff --git a/examples/purchase.rs b/examples/purchase.rs index 621a6bf3..72088c10 100644 --- a/examples/purchase.rs +++ b/examples/purchase.rs @@ -115,13 +115,13 @@ async fn receive_full_name( ) -> HandlerResult { match msg.text().map(ToOwned::to_owned) { Some(full_name) => { - let products = InlineKeyboardMarkup::default().append_row( - vec!["Apple", "Banana", "Orange", "Potato"].into_iter().map(|product| { - InlineKeyboardButton::callback(product.to_owned(), product.to_owned()) - }), - ); + let products = ["Apple", "Banana", "Orange", "Potato"].map(|product| { + InlineKeyboardButton::callback(product.to_owned(), product.to_owned()) + }); - bot.send_message(msg.chat.id, "Select a product:").reply_markup(products).await?; + bot.send_message(msg.chat.id, "Select a product:") + .reply_markup(InlineKeyboardMarkup::new([products])) + .await?; dialogue.update(State::ReceiveProductChoice { full_name }).await?; } None => {