mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
Fix typo: ReplyMarkup::{keyboad => keyboard}
This commit adds `ReplyMarkup::keyboard}` and deprecates `ReplyMarkup::keyboad`.
This commit is contained in:
parent
907d8a23a9
commit
b5003d8b34
2 changed files with 19 additions and 1 deletions
|
@ -7,6 +7,13 @@ 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
|
||||
|
||||
## [0.2.1] - 2020-03-19
|
||||
|
||||
### Fixed
|
||||
|
|
|
@ -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)]
|
||||
|
|
Loading…
Reference in a new issue