From 734d1c53ad2488aba411554cabe5232f8cdb1d5a Mon Sep 17 00:00:00 2001 From: Tamo Date: Thu, 6 Jun 2024 16:31:07 +0200 Subject: [PATCH] fix a panic in yaup --- meilisearch/tests/common/index.rs | 2 +- meilisearch/tests/documents/get_documents.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/meilisearch/tests/common/index.rs b/meilisearch/tests/common/index.rs index f81fe8c8a..114ede9b8 100644 --- a/meilisearch/tests/common/index.rs +++ b/meilisearch/tests/common/index.rs @@ -429,6 +429,6 @@ impl Index<'_> { pub struct GetAllDocumentsOptions { pub limit: Option, pub offset: Option, - pub fields: Option>, pub retrieve_vectors: bool, + pub fields: Option>, } diff --git a/meilisearch/tests/documents/get_documents.rs b/meilisearch/tests/documents/get_documents.rs index 1ade00b06..3bf3727c4 100644 --- a/meilisearch/tests/documents/get_documents.rs +++ b/meilisearch/tests/documents/get_documents.rs @@ -223,9 +223,7 @@ async fn test_get_all_documents_attributes_to_retrieve() { assert_eq!(response["limit"], json!(20)); assert_eq!(response["total"], json!(77)); - let (response, code) = index - .get_all_documents(GetAllDocumentsOptions { fields: Some(vec![]), ..Default::default() }) - .await; + let (response, code) = index.get_all_documents_raw("?fields=").await; assert_eq!(code, 200); assert_eq!(response["results"].as_array().unwrap().len(), 20); for results in response["results"].as_array().unwrap() {