From f33031ca6b8ae6b718e6e37cf77dc39075988b41 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Wed, 4 May 2022 10:11:51 +0100 Subject: [PATCH] Ensure doc tests compile successfully --- lib/src/kvs/ds.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/src/kvs/ds.rs b/lib/src/kvs/ds.rs index 50da7dba..ed2b993c 100644 --- a/lib/src/kvs/ds.rs +++ b/lib/src/kvs/ds.rs @@ -33,8 +33,10 @@ impl Datastore { /// /// ```rust,no_run /// # use surrealdb::Datastore; - /// # fn main() -> Result<()> { - /// let ds = Datastore::new("memory")?; + /// # use surrealdb::Error; + /// # #[tokio::main] + /// # async fn main() -> Result<(), Error> { + /// let ds = Datastore::new("memory").await?; /// # Ok(()) /// # } /// ``` @@ -43,8 +45,10 @@ impl Datastore { /// /// ```rust,no_run /// # use surrealdb::Datastore; - /// # fn main() -> Result<()> { - /// let ds = Datastore::new("file://temp.db")?; + /// # use surrealdb::Error; + /// # #[tokio::main] + /// # async fn main() -> Result<(), Error> { + /// let ds = Datastore::new("file://temp.db").await?; /// # Ok(()) /// # } /// ``` @@ -53,8 +57,10 @@ impl Datastore { /// /// ```rust,no_run /// # use surrealdb::Datastore; - /// # fn main() -> Result<()> { - /// let ds = Datastore::new("tikv://127.0.0.1:2379")?; + /// # use surrealdb::Error; + /// # #[tokio::main] + /// # async fn main() -> Result<(), Error> { + /// let ds = Datastore::new("tikv://127.0.0.1:2379").await?; /// # Ok(()) /// # } /// ```