Fix build issues

This commit is contained in:
Michael Pivato
2023-10-13 10:43:27 +10:30
parent 9a5a89d683
commit c1771b66c4
4 changed files with 1134 additions and 107 deletions

View File

@@ -266,7 +266,7 @@ where
let mut limited_ccs: Vec<String> = Vec::new();
for limit_to in limit_tos.iter() {
// TODO: It is technically possible to have more than one limit to (I think?) for a slot, so consider eventually splitting this and doing a foreach
let limit_value = area.get(&("LimitTo:".to_owned() + limit_to)).unwrap();
let limit_value = area.get(&format!("LimitTo:{}", limit_to)).unwrap();
if limit_value.is_empty() {
continue;
}
@@ -274,7 +274,7 @@ where
limited_ccs.push(limit_value.clone());
} else {
let mut found_ccs = rollups
.get(&("RollupSlot:".to_owned() + limit_to))
.get(&format!("RollupSlot:{}", limit_to))
.map(|rollups| rollups.get(limit_value))
.flatten()
.unwrap()

View File

@@ -34,6 +34,7 @@ impl From<&String> for SourceType {
"S" => SourceType::Service,
"R" => SourceType::Revenue,
"T" => SourceType::Transfer,
_ => panic!{}
}
}
}
@@ -279,7 +280,7 @@ where
equal: record.get("FilterNotIn").unwrap() != "",
field: record.get("FilterField").unwrap().clone(),
value: record.get("FilterValue").unwrap().clone(),
source_type: record.get("FilterSourceType").unwrap().clone(),
source_type: SourceType::from(&record.get("FilterSourceType").unwrap().clone()),
};
let all_filters = &mut all_definitions
.get_mut(record.get("Name").unwrap())
@@ -306,7 +307,7 @@ where
}
"Constraint" => {
let constraint = Constraint {
source_type: record.get("ConstraintSourceType").unwrap().to_owned(),
source_type: SourceType::from(&record.get("ConstraintSourceType").unwrap().to_owned()),
field: record.get("ConstraintColumn").unwrap().to_owned(),
constraint_type: ConstraintType::from(record.get("ConstraintType").unwrap()),
value: record.get("ConstraintValue").unwrap().to_owned(),