From ddf2e9fc5efb48a5c887bd4cdcc647557f5bcad1 Mon Sep 17 00:00:00 2001 From: VasanthakumarV Date: Sun, 10 Oct 2021 16:26:37 +0530 Subject: [PATCH] Shorten the closures --- src/io/json/write/serialize.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/io/json/write/serialize.rs b/src/io/json/write/serialize.rs index 18dbdfdc826..8aa43ce946e 100644 --- a/src/io/json/write/serialize.rs +++ b/src/io/json/write/serialize.rs @@ -203,7 +203,7 @@ fn write_array(array: &dyn Array) -> Value { array.len(), ); zip_validity(jsonmaps.into_iter(), array.validity().map(|v| v.iter())) - .map(|m| m.map(|o| Value::Object(o)).unwrap_or(Value::Null)) + .map(|m| m.map(Value::Object).unwrap_or(Value::Null)) .collect() } _ => { @@ -304,7 +304,7 @@ fn set_column_for_json_rows( .for_each(|(row, obj)| { row.insert( col_name.to_string(), - obj.map(|o| Value::Object(o)).unwrap_or(Value::Null), + obj.map(Value::Object).unwrap_or(Value::Null), ); }); }