File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -2321,12 +2321,24 @@ macro_rules! _config_data {
2321
2321
2322
2322
/// All fields `Option<T>`, `None` representing fields not set in a particular JSON/TOML blob.
2323
2323
#[ allow( non_snake_case) ]
2324
- #[ derive( Debug , Clone , Serialize , Default ) ]
2324
+ #[ derive( Clone , Serialize , Default ) ]
2325
2325
struct $input { $(
2326
2326
#[ serde( skip_serializing_if = "Option::is_none" ) ]
2327
2327
$field: Option <$ty>,
2328
2328
) * }
2329
2329
2330
+ impl std:: fmt:: Debug for $input {
2331
+ fn fmt( & self , f: & mut std:: fmt:: Formatter <' _>) -> std:: fmt:: Result {
2332
+ let mut s = f. debug_struct( stringify!( $input) ) ;
2333
+ $(
2334
+ if let Some ( val) = self . $field. as_ref( ) {
2335
+ s. field( stringify!( $field) , val) ;
2336
+ }
2337
+ ) *
2338
+ s. finish( )
2339
+ }
2340
+ }
2341
+
2330
2342
/// Newtype of
2331
2343
#[ doc = stringify!( $name) ]
2332
2344
/// expressing that this was read directly from a single, root config blob.
You can’t perform that action at this time.
0 commit comments