Update teloxide-core to v0.6.0

This commit is contained in:
Hirrolot 2022-04-25 18:44:27 +06:00
parent 035277cd26
commit 7fc1f6f180
3 changed files with 9 additions and 4 deletions

View file

@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## unreleased
### Changed
- Update teloxide-core to v0.6.0 with [Bot API 6.0] support [**BC**].
[Bot API 6.0]: https://core.telegram.org/bots/api#april-16-2022
## 0.8.1 - 2022-04-24
### Added

View file

@ -56,7 +56,7 @@ full = [
]
[dependencies]
teloxide-core = { version = "0.5.1", default-features = false }
teloxide-core = { version = "0.6.0", default-features = false }
teloxide-macros = { version = "0.6.0", optional = true }
serde_json = "1.0"

View file

@ -115,9 +115,8 @@ async fn receive_full_name(
) -> HandlerResult {
match msg.text().map(ToOwned::to_owned) {
Some(full_name) => {
let products = ["Apple", "Banana", "Orange", "Potato"].map(|product| {
InlineKeyboardButton::callback(product.to_owned(), product.to_owned())
});
let products = ["Apple", "Banana", "Orange", "Potato"]
.map(|product| InlineKeyboardButton::callback(product, product));
bot.send_message(msg.chat.id, "Select a product:")
.reply_markup(InlineKeyboardMarkup::new([products]))