Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Shorten the closures
Browse files Browse the repository at this point in the history
  • Loading branch information
VasanthakumarV committed Oct 10, 2021
1 parent 9ea077d commit ddf2e9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/io/json/write/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
_ => {
Expand Down Expand Up @@ -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),
);
});
}
Expand Down

0 comments on commit ddf2e9f

Please sign in to comment.