From 1a7f1282af22a86613233006712944dc98ba38c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 12 Oct 2023 17:00:08 +0200 Subject: [PATCH] Fix test to use new common Value type --- meilisearch/tests/search/distinct.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meilisearch/tests/search/distinct.rs b/meilisearch/tests/search/distinct.rs index 068bd12b1..93c5197a6 100644 --- a/meilisearch/tests/search/distinct.rs +++ b/meilisearch/tests/search/distinct.rs @@ -1,8 +1,8 @@ use meili_snap::snapshot; use once_cell::sync::Lazy; -use serde_json::{json, Value}; -use crate::common::Server; +use crate::common::{Server, Value}; +use crate::json; pub(self) static DOCUMENTS: Lazy = Lazy::new(|| { json!([ @@ -33,7 +33,7 @@ async fn distinct_search_with_offset_no_ranking() { index.update_distinct_attribute(json!(DOCUMENT_DISTINCT_KEY)).await; index.wait_task(1).await; - fn get_hits(response: Value) -> Vec { + fn get_hits(Value(response): Value) -> Vec { let hits_array = response["hits"].as_array().unwrap(); hits_array.iter().map(|h| h[DOCUMENT_DISTINCT_KEY].as_i64().unwrap()).collect::>() }