Skip to content

Commit a91ff63

Browse files
authored
Refactor: remove fixed_size option from ads-client config (#6984)
1 parent 3384fe7 commit a91ff63

File tree

2 files changed

+0
-35
lines changed

2 files changed

+0
-35
lines changed

components/ads-client/src/lib.rs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -249,16 +249,9 @@ pub struct IABContent {
249249
pub category_ids: Vec<String>,
250250
}
251251

252-
#[derive(Debug, Clone, PartialEq, uniffi::Record)]
253-
pub struct MozAdsSize {
254-
pub width: u16,
255-
pub height: u16,
256-
}
257-
258252
#[derive(Debug, Clone, PartialEq, uniffi::Record)]
259253
pub struct MozAdsPlacementConfig {
260254
pub placement_id: String,
261-
pub fixed_size: Option<MozAdsSize>,
262255
pub iab_content: Option<IABContent>,
263256
}
264257

@@ -302,26 +295,20 @@ mod tests {
302295
taxonomy: IABContentTaxonomy::IAB2_1,
303296
category_ids: vec!["entertainment".to_string()],
304297
}),
305-
fixed_size: None,
306298
},
307299
MozAdsPlacementConfig {
308300
placement_id: "example_placement_2".to_string(),
309301
iab_content: Some(IABContent {
310302
taxonomy: IABContentTaxonomy::IAB3_0,
311303
category_ids: vec![],
312304
}),
313-
fixed_size: None,
314305
},
315306
MozAdsPlacementConfig {
316307
placement_id: "example_placement_3".to_string(),
317308
iab_content: Some(IABContent {
318309
taxonomy: IABContentTaxonomy::IAB2_1,
319310
category_ids: vec![],
320311
}),
321-
fixed_size: Some(MozAdsSize {
322-
width: 200,
323-
height: 200,
324-
}),
325312
},
326313
];
327314
let request = inner_component
@@ -380,26 +367,20 @@ mod tests {
380367
taxonomy: IABContentTaxonomy::IAB2_1,
381368
category_ids: vec!["entertainment".to_string()],
382369
}),
383-
fixed_size: None,
384370
},
385371
MozAdsPlacementConfig {
386372
placement_id: "example_placement_2".to_string(),
387373
iab_content: Some(IABContent {
388374
taxonomy: IABContentTaxonomy::IAB3_0,
389375
category_ids: vec![],
390376
}),
391-
fixed_size: None,
392377
},
393378
MozAdsPlacementConfig {
394379
placement_id: "example_placement_2".to_string(),
395380
iab_content: Some(IABContent {
396381
taxonomy: IABContentTaxonomy::IAB2_1,
397382
category_ids: vec![],
398383
}),
399-
fixed_size: Some(MozAdsSize {
400-
width: 200,
401-
height: 200,
402-
}),
403384
},
404385
];
405386
let request = inner_component.build_request_from_placement_configs(&configs);
@@ -464,10 +445,6 @@ mod tests {
464445
taxonomy: IABContentTaxonomy::IAB2_1,
465446
category_ids: vec![],
466447
}),
467-
fixed_size: Some(MozAdsSize {
468-
width: 200,
469-
height: 200,
470-
}),
471448
});
472449

473450
let mut api_resp = get_example_happy_ad_response();
@@ -501,10 +478,6 @@ mod tests {
501478
taxonomy: IABContentTaxonomy::IAB2_1,
502479
category_ids: vec![],
503480
}),
504-
fixed_size: Some(MozAdsSize {
505-
width: 200,
506-
height: 200,
507-
}),
508481
});
509482

510483
let placements = inner_component
@@ -533,10 +506,6 @@ mod tests {
533506
taxonomy: IABContentTaxonomy::IAB2_1,
534507
category_ids: vec![],
535508
}),
536-
fixed_size: Some(MozAdsSize {
537-
width: 200,
538-
height: 200,
539-
}),
540509
});
541510

542511
let mut api_resp = get_example_happy_ad_response();

components/ads-client/src/test_utils.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,13 @@ pub fn get_example_happy_placement_config() -> Vec<MozAdsPlacementConfig> {
2121
taxonomy: IABContentTaxonomy::IAB2_1,
2222
category_ids: vec!["entertainment".to_string()],
2323
}),
24-
fixed_size: None,
2524
},
2625
MozAdsPlacementConfig {
2726
placement_id: "example_placement_2".to_string(),
2827
iab_content: Some(IABContent {
2928
taxonomy: IABContentTaxonomy::IAB3_0,
3029
category_ids: vec![],
3130
}),
32-
fixed_size: None,
3331
},
3432
]
3533
}
@@ -86,7 +84,6 @@ pub fn get_example_happy_placements() -> HashMap<String, MozAdsPlacement> {
8684
taxonomy: IABContentTaxonomy::IAB2_1,
8785
category_ids: vec!["entertainment".to_string()],
8886
}),
89-
fixed_size: None,
9087
},
9188
content: MozAd {
9289
url: Some("https://ads.fakeexample.org/example_ad_1".to_string()),
@@ -113,7 +110,6 @@ pub fn get_example_happy_placements() -> HashMap<String, MozAdsPlacement> {
113110
taxonomy: IABContentTaxonomy::IAB3_0,
114111
category_ids: vec![],
115112
}),
116-
fixed_size: None,
117113
},
118114
content: MozAd {
119115
url: Some("https://ads.fakeexample.org/example_ad_2".to_string()),

0 commit comments

Comments
 (0)