@@ -248,24 +248,21 @@ macro_rules! _assert_serialized_snapshot {
248
248
// and pass to `_assert_snapshot_base`
249
249
( format=$format: ident, $value: expr, $( match ..) ? { $( $k: expr => $v: expr) ,* $( , ) ?} $( $arg: tt) * ) => { {
250
250
let transform = |value| {
251
- let ( _, value) = $crate:: _prepare_snapshot_for_redaction!( value, { $( $k => $v) ,* } , $format) ;
252
- value
251
+ $crate:: _prepare_snapshot_for_redaction!( value, { $( $k => $v) ,* } , $format)
253
252
} ;
254
253
$crate:: _assert_snapshot_base!( transform=transform, $value $( $arg) * ) ;
255
254
} } ;
256
255
// If there's a name, redaction expressions, and debug_expr, capture and pass all to `_assert_snapshot_base`
257
256
( format=$format: ident, $name: expr, $value: expr, $( match ..) ? { $( $k: expr => $v: expr) ,* $( , ) ?} , $debug_expr: expr $( , ) ?) => { {
258
257
let transform = |value| {
259
- let ( _, value) = $crate:: _prepare_snapshot_for_redaction!( value, { $( $k => $v) ,* } , $format) ;
260
- value
258
+ $crate:: _prepare_snapshot_for_redaction!( value, { $( $k => $v) ,* } , $format)
261
259
} ;
262
260
$crate:: _assert_snapshot_base!( transform=transform, $name, $value, $debug_expr) ;
263
261
} } ;
264
262
// If there's a name and redaction expressions, capture and pass to `_assert_snapshot_base`
265
263
( format=$format: ident, $name: expr, $value: expr, $( match ..) ? { $( $k: expr => $v: expr) ,* $( , ) ?} $( , ) ?) => { {
266
264
let transform = |value| {
267
- let ( _, value) = $crate:: _prepare_snapshot_for_redaction!( value, { $( $k => $v) ,* } , $format) ;
268
- value
265
+ $crate:: _prepare_snapshot_for_redaction!( value, { $( $k => $v) ,* } , $format)
269
266
} ;
270
267
$crate:: _assert_snapshot_base!( transform=transform, $name, $value) ;
271
268
} } ;
@@ -276,7 +273,7 @@ macro_rules! _assert_serialized_snapshot {
276
273
& value,
277
274
$crate:: _macro_support:: SerializationFormat :: $format,
278
275
) } ;
279
- $crate:: _assert_snapshot_base!( transform = transform, $( $arg) * ) ;
276
+ $crate:: _assert_snapshot_base!( transform= transform, $( $arg) * ) ;
280
277
} } ;
281
278
}
282
279
@@ -292,12 +289,11 @@ macro_rules! _prepare_snapshot_for_redaction {
292
289
$crate:: _macro_support:: Redaction :: from( $v)
293
290
) , ) *
294
291
] ;
295
- let value = $crate:: _macro_support:: serialize_value_redacted(
292
+ $crate:: _macro_support:: serialize_value_redacted(
296
293
& $value,
297
294
& vec,
298
295
$crate:: _macro_support:: SerializationFormat :: $format,
299
- ) ;
300
- ( vec, value)
296
+ )
301
297
}
302
298
}
303
299
}
0 commit comments