Skip to content

Commit

Permalink
chore: cleanup some unused code warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rholshausen committed Jul 18, 2024
1 parent c551867 commit 2b7d5e0
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions src/protobuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -703,19 +703,7 @@ fn build_struct_field(
message_builder, matching_rules, generators);

match field_value {
Value::Object(map) => if let Some(matching_def) = map.get("pact:match") {
// if (fieldsMap.containsKey("pact:match")) {
// val expression = fieldsMap["pact:match"]!!.stringValue
// when (val ruleDefinition = MatchingRuleDefinition.parseMatchingRuleDefinition(expression)) {
// is Ok -> TODO()
// is Err -> {
// logger.error { "'$expression' is not a valid matching rule definition - ${ruleDefinition.error}" }
// throw RuntimeException("'$expression' is not a valid matching rule definition - ${ruleDefinition.error}")
// }
// }
// }
todo!()
} else {
Value::Object(map) => {
let mut fields = btreemap!{};
for (key, value) in map {
let field_path = path.join(key);
Expand Down Expand Up @@ -844,7 +832,9 @@ fn build_map_field(
Either::Left(rule) => {
matching_rules.add_rule(path.clone(), rule.clone(), RuleLogic::And)
},
Either::Right(mr) => todo!()
Either::Right(mr) => {
return Err(anyhow!("Was expecting a matching rule definition, but got a reference: {}", mr.name));
}
}
}
}
Expand Down

0 comments on commit 2b7d5e0

Please sign in to comment.