diff --git a/CHANGELOG.md b/CHANGELOG.md index d2886288..f083daa9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/Cargo.toml b/Cargo.toml index e48440a8..9be95edc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/examples/purchase.rs b/examples/purchase.rs index 72088c10..22ad5860 100644 --- a/examples/purchase.rs +++ b/examples/purchase.rs @@ -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]))