Merge pull request #69 from teloxide/insta022

(For instant release) Fix typo: `ReplyMarkup::{keyboad => keyboard}`
This commit is contained in:
Hirrolot 2021-03-22 14:34:57 +06:00 committed by GitHub
commit e80470c8a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 2 deletions

View file

@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [unreleased]
## [0.2.2] - 2020-03-22
### Fixed
- Typo: `ReplyMarkup::{keyboad => keyboard}` ([#69][pr69])
- Note: method with the old name was deprecated and hidden from docs
[pr69]: https://github.com/teloxide/teloxide-core/pull/69
## [0.2.1] - 2020-03-19
### Fixed

View file

@ -1,7 +1,7 @@
[package]
name = "teloxide-core"
description = "Core part of the `teloxide` library - telegram bot API client"
version = "0.2.1"
version = "0.2.2"
edition = "2018"
authors = [
"Temirkhan Myrzamadi <hirrolot@gmail.com>",

View file

@ -1,5 +1,6 @@
//! Commonly used items.
#[doc(no_inline)]
pub use crate::{
payloads::setters::*,
requests::{Request, Requester, RequesterExt},

View file

@ -36,7 +36,7 @@ impl ReplyMarkup {
/// `ReplyMarkup::Keyboard(KeyboardMarkup::new(_))`.
///
/// [`Keyboard`]: ReplyMarkup::Keyboard
pub fn keyboad<K>(keyboard: K) -> Self
pub fn keyboard<K>(keyboard: K) -> Self
where
K: IntoIterator,
K::Item: IntoIterator<Item = KeyboardButton>,
@ -62,6 +62,17 @@ impl ReplyMarkup {
pub fn force_reply() -> Self {
Self::ForceReply(ForceReply::new())
}
// FIXME(waffle): remove this method in the next minor version bump (0.3.0)
#[doc(hidden)]
#[deprecated = "This method has a typo in name. Use `ReplyMarkup::keyboard` instead."]
pub fn keyboad<K>(keyboard: K) -> Self
where
K: IntoIterator,
K::Item: IntoIterator<Item = KeyboardButton>,
{
Self::Keyboard(KeyboardMarkup::new(keyboard))
}
}
#[cfg(test)]