Skip to content

Commit 6fdcf27

Browse files
committed
Update mismatch_keys to contain path from root
1 parent 2ad9332 commit 6fdcf27

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@ fn match_json(value: &Value, value1: &Value) -> Mismatch {
8585
if let Some(right_keys) = right_keys {
8686
right.append(&mut right_keys.iter().map(append_key).collect::<Vec<String>>());
8787
}
88-
mismatch_keys
88+
if let Some(mismatch_keys) = mismatch_keys {
89+
Some(mismatch_keys.iter().map(append_key).collect::<Vec<String>>())
90+
} else {
91+
None
92+
}
8993
},
9094
} {
9195
unequal_keys.append(&mut keys);

0 commit comments

Comments
 (0)