diff --git a/src/marketing/email.rs b/src/marketing/email.rs index 25b24111..e3f983b3 100644 --- a/src/marketing/email.rs +++ b/src/marketing/email.rs @@ -197,8 +197,8 @@ pub async fn get_campaign_email_metrics( .map_err(|e| format!("Query error: {}", e))?; let total = results.len() as i64; - let opened = results.iter().filter(|(o, _): &(Option, Option)| o.unwrap_or(false)).count() as i64; - let clicked = results.iter().filter(|(_, c): &(Option, Option)| c.unwrap_or(false)).count() as i64; + let opened = results.iter().filter(|pair| pair.0.unwrap_or(false)).count() as i64; + let clicked = results.iter().filter(|pair| pair.1.unwrap_or(false)).count() as i64; let recipients: Vec<(String, Option>)> = marketing_recipients::table .filter(marketing_recipients::campaign_id.eq(campaign_id))