From 475b34300e1c5bbdee86e4043452afcbcf7ad233 Mon Sep 17 00:00:00 2001 From: Devdutt Shenoi Date: Sun, 5 Jan 2025 14:53:01 +0530 Subject: [PATCH] style: cargo fmt --- src/utils/json/mod.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/utils/json/mod.rs b/src/utils/json/mod.rs index 6736d7ead..0d3ac1e79 100644 --- a/src/utils/json/mod.rs +++ b/src/utils/json/mod.rs @@ -38,12 +38,13 @@ pub fn flatten_json_body( validation_required: bool, ) -> Result { // Flatten the json body only if new schema and has less than 4 levels of nesting - let mut nested_value = if schema_version == SchemaVersion::V0 || has_more_than_four_levels(&body, 1) { - body - } else { - let flattened_json = generic_flattening(&body)?; - convert_to_array(flattened_json)? - }; + let mut nested_value = + if schema_version == SchemaVersion::V0 || has_more_than_four_levels(&body, 1) { + body + } else { + let flattened_json = generic_flattening(&body)?; + convert_to_array(flattened_json)? + }; flatten::flatten( &mut nested_value, "_",