Reorder Vec::is_empty skip

This commit is contained in:
Oleg A 2023-03-20 15:40:21 +03:00
parent dc04b93878
commit 5c162f4899
No known key found for this signature in database
GPG key ID: 5FE046817A9657C5

View file

@ -365,7 +365,7 @@ pub struct MediaAnimation {
/// For messages with a caption, special entities like usernames, URLs,
/// bot commands, etc. that appear in the caption.
#[serde(skip_serializing_if = "Vec::is_empty", default = "Vec::new")]
#[serde(default = "Vec::new", skip_serializing_if = "Vec::is_empty")]
pub caption_entities: Vec<MessageEntity>,
/// `true`, if the message media is covered by a spoiler animation.
@ -385,7 +385,7 @@ pub struct MediaAudio {
/// For messages with a caption, special entities like usernames, URLs,
/// bot commands, etc. that appear in the caption.
#[serde(skip_serializing_if = "Vec::is_empty", default = "Vec::new")]
#[serde(default = "Vec::new", skip_serializing_if = "Vec::is_empty")]
pub caption_entities: Vec<MessageEntity>,
/// The unique identifier of a media message group this message belongs
@ -411,7 +411,7 @@ pub struct MediaDocument {
/// For messages with a caption, special entities like usernames, URLs,
/// bot commands, etc. that appear in the caption.
#[serde(skip_serializing_if = "Vec::is_empty", default = "Vec::new")]
#[serde(default = "Vec::new", skip_serializing_if = "Vec::is_empty")]
pub caption_entities: Vec<MessageEntity>,
/// The unique identifier of a media message group this message belongs
@ -447,7 +447,7 @@ pub struct MediaPhoto {
/// For messages with a caption, special entities like usernames, URLs,
/// bot commands, etc. that appear in the caption.
#[serde(skip_serializing_if = "Vec::is_empty", default = "Vec::new")]
#[serde(default = "Vec::new", skip_serializing_if = "Vec::is_empty")]
pub caption_entities: Vec<MessageEntity>,
/// `true`, if the message media is covered by a spoiler animation.
@ -482,7 +482,7 @@ pub struct MediaText {
/// For text messages, special entities like usernames, URLs, bot
/// commands, etc. that appear in the text.
#[serde(skip_serializing_if = "Vec::is_empty", default = "Vec::new")]
#[serde(default = "Vec::new", skip_serializing_if = "Vec::is_empty")]
pub entities: Vec<MessageEntity>,
}
@ -497,7 +497,7 @@ pub struct MediaVideo {
/// For messages with a caption, special entities like usernames, URLs,
/// bot commands, etc. that appear in the caption.
#[serde(skip_serializing_if = "Vec::is_empty", default = "Vec::new")]
#[serde(default = "Vec::new", skip_serializing_if = "Vec::is_empty")]
pub caption_entities: Vec<MessageEntity>,
/// `true`, if the message media is covered by a spoiler animation.
@ -529,7 +529,7 @@ pub struct MediaVoice {
/// For messages with a caption, special entities like usernames, URLs,
/// bot commands, etc. that appear in the caption.
#[serde(skip_serializing_if = "Vec::is_empty", default = "Vec::new")]
#[serde(default = "Vec::new", skip_serializing_if = "Vec::is_empty")]
pub caption_entities: Vec<MessageEntity>,
}