Skip to content

Commit

Permalink
fix: Fix can't compare 2 eachKey matching rules, 2 eachValue matching…
Browse files Browse the repository at this point in the history
… rules
  • Loading branch information
tienvx committed Sep 6, 2024
1 parent effa4c7 commit 691ddae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rust/pact_models/src/matchingrules/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,8 @@ impl PartialEq for MatchingRule {
(MatchingRule::Include(str1), MatchingRule::Include(str2)) => str1 == str2,
(MatchingRule::ContentType(str1), MatchingRule::ContentType(str2)) => str1 == str2,
(MatchingRule::ArrayContains(variants1), MatchingRule::ArrayContains(variants2)) => variants1 == variants2,
(MatchingRule::EachKey(definition1), MatchingRule::EachKey(definition2)) => definition1 == definition2,
(MatchingRule::EachValue(definition1), MatchingRule::EachValue(definition2)) => definition1 == definition2,
_ => mem::discriminant(self) == mem::discriminant(other)
}
}
Expand Down

0 comments on commit 691ddae

Please sign in to comment.