Update bandwidth_overrides.rs

This commit is contained in:
Robert Chacón 2024-05-04 10:54:47 -06:00 committed by Herbert Wolverson
parent b4619da030
commit 78c2388501

View File

@ -96,7 +96,7 @@ fn numeric_string_to_f32(text: &str) -> Option<f32> {
/// * `bandwidth_overrides` - The bandwidth overrides to apply
pub fn apply_bandwidth_overrides(sites: &mut [UispSite], bandwidth_overrides: &BandwidthOverrides) {
for site in sites.iter_mut() {
if let Some((up, down)) = bandwidth_overrides.get(&site.name) {
if let Some((down, up)) = bandwidth_overrides.get(&site.name) {
// Apply the overrides
site.max_down_mbps = *down as u32;
site.max_up_mbps = *up as u32;
@ -195,4 +195,4 @@ mod test {
assert_eq!(sites[1].max_down_mbps, 400);
assert_eq!(sites[1].max_up_mbps, 400);
}
}
}