Skip to content

Commit e4bad3a

Browse files
committed
Fix doc tests
1 parent b101bea commit e4bad3a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/indexes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@ impl<Http: HttpClient> Index<Http> {
297297
/// name: String,
298298
/// genre: String,
299299
/// }
300-
/// # futures::executor::block_on(async move {
301-
/// # let client = Client::new(MEILISEARCH_URL, Some(MEILISEARCH_API_KEY));
300+
/// # tokio::runtime::Builder::new_current_thread().enable_all().build().unwrap().block_on(async {
301+
/// # let client = Client::new(MEILISEARCH_URL, Some(MEILISEARCH_API_KEY)).unwrap();
302302
/// let movies = client.index("execute_query");
303303
///
304304
/// // add some documents

src/search.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -682,8 +682,8 @@ pub struct MultiSearchResponse<T> {
682682
/// name: String,
683683
/// genre: String,
684684
/// }
685-
/// # futures::executor::block_on(async move {
686-
/// # let client = Client::new(MEILISEARCH_URL, Some(MEILISEARCH_API_KEY));
685+
/// # tokio::runtime::Builder::new_current_thread().enable_all().build().unwrap().block_on(async {
686+
/// # let client = Client::new(MEILISEARCH_URL, Some(MEILISEARCH_API_KEY)).unwrap();
687687
/// let movies = client.index("execute_query");
688688
///
689689
/// // add some documents
@@ -699,12 +699,12 @@ pub struct MultiSearchResponse<T> {
699699
/// ```
700700
///
701701
/// ```
702-
/// # use meilisearch_sdk::{Client, SearchQuery, Index};
702+
/// # use meilisearch_sdk::{client::*, indexes::*, search::*};
703703
/// #
704704
/// # let MEILISEARCH_URL = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
705705
/// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
706706
/// #
707-
/// # let client = Client::new(MEILISEARCH_URL, Some(MEILISEARCH_API_KEY));
707+
/// # let client = Client::new(MEILISEARCH_URL, Some(MEILISEARCH_API_KEY)).unwrap();
708708
/// # let index = client.index("facet_search_query_builder_build");
709709
/// let query = index.facet_search("kind")
710710
/// .with_facet_query("space")

0 commit comments

Comments
 (0)