@@ -272,7 +272,7 @@ fn normalize_value_to_unordered_redactions(
272
272
* act = normalize_str_to_unordered_redactions ( act, exp, substitutions) ;
273
273
}
274
274
( Array ( act) , Array ( exp) ) => {
275
- * act = normalize_array_to_unordered_redactions ( act, exp) ;
275
+ * act = normalize_array_to_unordered_redactions ( act, exp, substitutions ) ;
276
276
}
277
277
( Object ( act) , Object ( exp) ) => {
278
278
let has_key_wildcard =
@@ -301,6 +301,7 @@ fn normalize_value_to_unordered_redactions(
301
301
fn normalize_array_to_unordered_redactions (
302
302
actual : & [ serde_json:: Value ] ,
303
303
expected : & [ serde_json:: Value ] ,
304
+ substitutions : & Redactions ,
304
305
) -> Vec < serde_json:: Value > {
305
306
if actual == expected {
306
307
return actual. to_owned ( ) ;
@@ -317,7 +318,13 @@ fn normalize_array_to_unordered_redactions(
317
318
elided = true ;
318
319
} else {
319
320
actual_values. retain ( |actual_value| {
320
- if !matched && actual_value == expected_value {
321
+ let mut normalized_actual_value = actual_value. clone ( ) ;
322
+ normalize_value_to_unordered_redactions (
323
+ & mut normalized_actual_value,
324
+ expected_value,
325
+ substitutions,
326
+ ) ;
327
+ if !matched && normalized_actual_value == * expected_value {
321
328
matched = true ;
322
329
false
323
330
} else {
0 commit comments