mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2024-11-22 08:16:25 -06:00
Update bandwidth_overrides.rs
This commit is contained in:
parent
b4619da030
commit
78c2388501
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user