Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/async_reply_to_message_updates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async fn main() {
let bot_clone = bot.clone();

tokio::spawn(async move {
process_message(message, bot_clone).await;
process_message(*message, bot_clone).await;
});
}
update_params.offset = Some(i64::from(update.update_id) + 1);
Expand Down
2 changes: 1 addition & 1 deletion src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub struct ErrorResponse {
#[derive(Debug, Serialize, Deserialize, PartialEq)]
#[serde(untagged)]
pub enum MessageOrBool {
Message(Message),
Message(Box<Message>),
Bool(bool),
}

Expand Down
2 changes: 1 addition & 1 deletion src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,7 @@ pub struct BusinessMessagesDeleted {
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
#[serde(untagged)]
pub enum MaybeInaccessibleMessage {
Message(Message),
Message(Box<Message>),
InaccessibleMessage(InaccessibleMessage),
}

Expand Down
16 changes: 8 additions & 8 deletions src/updates.rs
Comment thread
EdJoPaTo marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ pub struct Update {
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdateContent {
Message(Message),
EditedMessage(Message),
ChannelPost(Message),
EditedChannelPost(Message),
Message(Box<Message>),
EditedMessage(Box<Message>),
ChannelPost(Box<Message>),
EditedChannelPost(Box<Message>),
BusinessConnection(BusinessConnection),
BusinessMessage(Message),
EditedBusinessMessage(Message),
BusinessMessage(Box<Message>),
EditedBusinessMessage(Box<Message>),
DeletedBusinessMessages(BusinessMessagesDeleted),
MessageReaction(MessageReactionUpdated),
MessageReactionCount(MessageReactionCountUpdated),
InlineQuery(InlineQuery),
ChosenInlineResult(ChosenInlineResult),
CallbackQuery(CallbackQuery),
CallbackQuery(Box<CallbackQuery>),
ShippingQuery(ShippingQuery),
PreCheckoutQuery(PreCheckoutQuery),
Poll(Poll),
Expand Down Expand Up @@ -121,7 +121,7 @@ mod serde_tests {

let expected = Update {
update_id: 2341,
content: UpdateContent::Message(message),
content: UpdateContent::Message(Box::new(message)),
};

assert_eq!(update, expected);
Expand Down