Skip to content

Commit

Permalink
Simplify the code
Browse files Browse the repository at this point in the history
  • Loading branch information
chmp committed Mar 25, 2023
1 parent 42db720 commit 8042a74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions serde_arrow/Implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,7 @@ let val_field = fields.iter_mut().find(|field| field.name == "date").unwrap();
val_field.data_type = DataType::Date64;

// only required if the datetime objects are serialized as strings
val_field.metadata.insert(
STRATEGY_KEY.to_string(),
Strategy::NaiveStrAsDate64.to_string(),
);
val_field.metadata = Strategy::NaiveStrAsDate64.into();
```

Currently only datetime objects are supported.
Expand Down
5 changes: 1 addition & 4 deletions serde_arrow/src/test/arrow2/schema_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,10 +466,7 @@ fn struct_tuple() {
]),
false,
);
expected.metadata.insert(
STRATEGY_KEY.to_string(),
Strategy::TupleAsStruct.to_string(),
);
expected.metadata = Strategy::TupleAsStruct.into();

assert_eq!(field, expected);
}
Expand Down

0 comments on commit 8042a74

Please sign in to comment.