diff --git a/src/client.rs b/src/client.rs index 023ad377..7a3a5cf0 100644 --- a/src/client.rs +++ b/src/client.rs @@ -9,6 +9,7 @@ use crate::{ use serde::Deserialize; use serde_json::{json, Value}; use std::{collections::HashMap, time::Duration}; +use time::OffsetDateTime; /// The top-level struct of the SDK, representing a client containing [indexes](../indexes/struct.Index.html). #[derive(Debug, Clone)] @@ -588,7 +589,8 @@ impl Client { #[serde(rename_all = "camelCase")] pub struct ClientStats { pub database_size: usize, - pub last_update: Option, + #[serde(with = "time::serde::rfc3339::option")] + pub last_update: Option, pub indexes: HashMap, } diff --git a/src/tasks.rs b/src/tasks.rs index 246c8b5e..e49149d8 100644 --- a/src/tasks.rs +++ b/src/tasks.rs @@ -329,7 +329,7 @@ impl Task { /// # futures::executor::block_on(async move { /// # let client = Client::new("http://localhost:7700", "masterKey"); /// let task = client - /// .create_index("is_success", None) + /// .create_index("is_pending", None) /// .await /// .unwrap(); ///