diff --git a/telers/src/methods/save_prepared_inline_message.rs b/telers/src/methods/save_prepared_inline_message.rs index 66104c6..72fed57 100644 --- a/telers/src/methods/save_prepared_inline_message.rs +++ b/telers/src/methods/save_prepared_inline_message.rs @@ -44,7 +44,7 @@ impl SavePreparedInlineMessage { #[must_use] pub fn user_id(self, val: i64) -> Self { Self { - user_id: val.into(), + user_id: val, ..self } } diff --git a/telers/src/types/transaction_partner.rs b/telers/src/types/transaction_partner.rs index d636150..f55cd19 100644 --- a/telers/src/types/transaction_partner.rs +++ b/telers/src/types/transaction_partner.rs @@ -17,7 +17,7 @@ use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, PartialEq, Deserialize, Serialize)] #[serde(tag = "type", rename_all = "snake_case")] pub enum TransactionPartner { - User(TransactionPartnerUser), + User(Box), AffiliateProgram(TransactionPartnerAffiliateProgram), Fragment(TransactionPartnerFragment), TelegramAds(TransactionPartnerTelegramAds), @@ -27,13 +27,7 @@ pub enum TransactionPartner { impl From for TransactionPartner { fn from(partner: TransactionPartnerUser) -> Self { - Self::User(partner) - } -} - -impl From for TransactionPartner { - fn from(partner: TransactionPartnerAffiliateProgram) -> Self { - Self::AffiliateProgram(partner) + Self::User(Box::new(partner)) } }