(obj: &Map<String, Value>, key: &str)
| 605 | } |
| 606 | |
| 607 | fn optional_timestamp_field(obj: &Map<String, Value>, key: &str) -> Result<Option<DateTime<Utc>>> { |
| 608 | match obj.get(key) { |
| 609 | None | Some(Value::Null) => Ok(None), |
| 610 | Some(_) => timestamp_field(obj, key).map(Some), |
| 611 | } |
| 612 | } |
| 613 | |
| 614 | #[cfg(test)] |
| 615 | mod tests { |
no test coverage detected