Skip to content

Commit

Permalink
Lint changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Desiders committed Dec 31, 2024
1 parent 341c413 commit 62b7646
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion telers/src/methods/save_prepared_inline_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
10 changes: 2 additions & 8 deletions telers/src/types/transaction_partner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<TransactionPartnerUser>),
AffiliateProgram(TransactionPartnerAffiliateProgram),
Fragment(TransactionPartnerFragment),
TelegramAds(TransactionPartnerTelegramAds),
Expand All @@ -27,13 +27,7 @@ pub enum TransactionPartner {

impl From<TransactionPartnerUser> for TransactionPartner {
fn from(partner: TransactionPartnerUser) -> Self {
Self::User(partner)
}
}

impl From<TransactionPartnerAffiliateProgram> for TransactionPartner {
fn from(partner: TransactionPartnerAffiliateProgram) -> Self {
Self::AffiliateProgram(partner)
Self::User(Box::new(partner))
}
}

Expand Down

0 comments on commit 62b7646

Please sign in to comment.