@@ -432,7 +432,7 @@ impl Manager {
432
432
433
433
pub async fn get_next_ad_unit ( & self ) -> Result < Option < NextAdUnit > , Error > {
434
434
let units_for_slot = self . get_market_demand_resp ( ) . await ?;
435
- let campaigns = & units_for_slot. campaigns ;
435
+ let m_campaigns = & units_for_slot. campaigns ;
436
436
let fallback_unit = units_for_slot. fallback_unit ;
437
437
let targeting_input = units_for_slot. targeting_input_base ;
438
438
@@ -444,7 +444,7 @@ impl Manager {
444
444
445
445
// Stickiness is when we keep showing an ad unit for a slot for some time in order to achieve fair impression value
446
446
// see https://github.com/AdExNetwork/adex-adview-manager/issues/65
447
- let sticky_result = self . get_sticky_ad_unit ( campaigns , & hostname) . await ;
447
+ let sticky_result = self . get_sticky_ad_unit ( m_campaigns , & hostname) . await ;
448
448
if let Some ( sticky) = sticky_result {
449
449
return Ok ( Some ( NextAdUnit {
450
450
unit : sticky. unit ,
@@ -461,19 +461,19 @@ impl Manager {
461
461
let seed = BigNum :: from ( random as u64 ) ;
462
462
463
463
// Apply targeting, now with adView.* variables, and sort the resulting ad units
464
- let mut units_with_price = campaigns
464
+ let mut units_with_price = m_campaigns
465
465
. iter ( )
466
- . map ( |campaign | {
466
+ . map ( |m_campaign | {
467
467
// since we are in a Iterator.map(), we can't use async, so we block
468
- if block_on ( self . is_campaign_sticky ( campaign . campaign . id ) ) {
468
+ if block_on ( self . is_campaign_sticky ( m_campaign . campaign . id ) ) {
469
469
return vec ! [ ] ;
470
470
}
471
471
472
- let campaign_id = campaign . campaign . id ;
472
+ let campaign_id = m_campaign . campaign . id ;
473
473
474
- let mut unit_input = targeting_input. clone ( ) . with_campaign ( campaign . campaign . clone ( ) ) ;
474
+ let mut unit_input = targeting_input. clone ( ) . with_campaign ( m_campaign . campaign . clone ( ) ) ;
475
475
476
- campaign
476
+ m_campaign
477
477
. units_with_price
478
478
. iter ( )
479
479
. filter ( |unit_with_price| {
@@ -490,7 +490,7 @@ impl Manager {
490
490
let on_type_error = |error, rule| error ! ( & self . logger, "Rule evaluation error for {:?}" , campaign_id; "error" => ?error, "rule" => ?rule) ;
491
491
492
492
targeting:: eval_with_callback (
493
- & campaign . campaign . targeting_rules ,
493
+ & m_campaign . campaign . targeting_rules ,
494
494
& unit_input,
495
495
& mut output,
496
496
Some ( on_type_error)
@@ -539,11 +539,11 @@ impl Manager {
539
539
540
540
// Return the results, with a fallback unit if there is one
541
541
if let Some ( ( unit_with_price, campaign_id) ) = auction_winner {
542
- let validators = campaigns
542
+ let validators = m_campaigns
543
543
. iter ( )
544
- . find_map ( |campaign | {
545
- if & campaign . campaign . id == campaign_id {
546
- Some ( & campaign . campaign . validators )
544
+ . find_map ( |m_campaign | {
545
+ if & m_campaign . campaign . id == campaign_id {
546
+ Some ( & m_campaign . campaign . validators )
547
547
} else {
548
548
None
549
549
}
0 commit comments