From f5936671698d40738244bb180e08a8c7c79aa1a5 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Thu, 22 Jun 2023 10:16:58 -0700 Subject: [PATCH] fix lifetimes --- web3_proxy/src/frontend/users/referral.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web3_proxy/src/frontend/users/referral.rs b/web3_proxy/src/frontend/users/referral.rs index d6594b0b..3038228f 100644 --- a/web3_proxy/src/frontend/users/referral.rs +++ b/web3_proxy/src/frontend/users/referral.rs @@ -167,7 +167,7 @@ pub async fn user_shared_referral_stats( if let Some((referrer_record, referral_records)) = query_result.into_iter().next() { for referral_record in referral_records.into_iter() { - used_referral_code = Some(referrer_record.referral_code.as_str()); + used_referral_code = Some(referrer_record.referral_code.clone()); // The foreign key is never optional let referred_user = user::Entity::find_by_id(referral_record.user_id)