(obj: &Map<String, Value>, key: &str)
| 640 | } |
| 641 | |
| 642 | fn optional_timestamp_field(obj: &Map<String, Value>, key: &str) -> Result<Option<DateTime<Utc>>> { |
| 643 | match obj.get(key) { |
| 644 | None | Some(Value::Null) => Ok(None), |
| 645 | Some(_) => timestamp_field(obj, key).map(Some), |
| 646 | } |
| 647 | } |
| 648 | |
| 649 | #[cfg(test)] |
| 650 | mod tests { |
no test coverage detected