Skip to content

Commit e49ccec

Browse files
committed
fix(stack-encrypt): state the target-or-verbs rule without an equivalent mutant
Comparing two equality tests with != survives negating both; matches! keeps the rule and leaves the comparison as the one thing to mutate.
1 parent 2d00732 commit e49ccec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎packages/stack-encrypt/src/plan/build.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ pub(crate) fn check_indexes(at: &str, indexes: &[IndexSpec]) -> Result<(), PlanE
10301030
/// those are the likelier mistakes.
10311031
fn check_pair<S, K>(earlier: &Declared<S, K>, field: &Declared<S, K>) -> Result<(), PlanError> {
10321032
if earlier.name == field.name {
1033-
let target = |f: &Declared<S, K>| f.kind == FieldKind::EncryptInto;
1033+
let target = |f: &Declared<S, K>| matches!(f.kind, FieldKind::EncryptInto);
10341034
if target(earlier) != target(field) {
10351035
return Err(PlanError::TargetWithVerbs {
10361036
field: field.name.to_string(),

0 commit comments

Comments
 (0)