mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-08 19:33:53 +01:00
Fix clippy "warning: you should consider deriving a Default
implementation for types::inline_keyboard_markup::InlineKeyboardMarkup
"
This commit is contained in:
parent
77b24eaa3f
commit
101630a3a1
1 changed files with 2 additions and 4 deletions
|
@ -5,7 +5,7 @@ use crate::types::InlineKeyboardButton;
|
|||
///
|
||||
/// *Note*: This will only work in Telegram versions released after
|
||||
/// 9 April, 2016. Older clients will display unsupported message.
|
||||
#[derive(Debug, Serialize, Deserialize, Hash, PartialEq, Eq, Clone)]
|
||||
#[derive(Debug, Serialize, Deserialize, Hash, PartialEq, Eq, Clone, Default)]
|
||||
pub struct InlineKeyboardMarkup {
|
||||
/// Array of button rows, each represented by an Array of
|
||||
/// [`InlineKeyboardButton`] objects
|
||||
|
@ -28,9 +28,7 @@ pub struct InlineKeyboardMarkup {
|
|||
/// ```
|
||||
impl InlineKeyboardMarkup {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
inline_keyboard: vec![],
|
||||
}
|
||||
<_>::default()
|
||||
}
|
||||
|
||||
pub fn append_row(mut self, buttons: Vec<InlineKeyboardButton>) -> Self {
|
||||
|
|
Loading…
Reference in a new issue