Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoLegends committed Jan 4, 2020
1 parent c23f7e5 commit 2e1c30f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 7 additions & 4 deletions src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,14 @@ impl Client {
/// ```rust
/// use influxdb::{Client, Query, Timestamp};
///
/// # #[tokio::main]
/// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
/// let client = Client::new("http://localhost:8086", "test");
/// let _future = client.query(
/// &Query::write_query(Timestamp::Now, "weather")
/// .add_field("temperature", 82)
/// );
/// let query = Query::write_query(Timestamp::Now, "weather")
/// .add_field("temperature", 82);
/// let results = client.query(query).await?;
/// # Ok(())
/// #}
/// ```
/// # Errors
///
Expand Down
3 changes: 2 additions & 1 deletion src/integrations/serde_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
//! }
//!
//! # #[tokio::main]
//! # async fn main() -> Box<dyn std::error::Error> {
//! # async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let client = Client::new("http://localhost:8086", "test");
//! let query = Query::raw_read_query(
//! "SELECT temperature FROM /weather_[a-z]*$/ WHERE time > now() - 1m ORDER BY DESC",
Expand All @@ -42,6 +42,7 @@
//! }
//! })
//! .collect::<Vec<Weather>>();
//! # Ok(())
//! # }
//! ```
Expand Down

0 comments on commit 2e1c30f

Please sign in to comment.