From 9e8888b603c6307992aa294dc37561eeeafa723e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar?= Date: Thu, 17 Jun 2021 18:50:18 +0200 Subject: [PATCH 1/2] Fix clippy errors --- meilisearch-http/tests/index/stats.rs | 4 ++-- meilisearch-http/tests/stats/mod.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meilisearch-http/tests/index/stats.rs b/meilisearch-http/tests/index/stats.rs index d32c06d2b..b0df427b6 100644 --- a/meilisearch-http/tests/index/stats.rs +++ b/meilisearch-http/tests/index/stats.rs @@ -14,7 +14,7 @@ async fn stats() { assert_eq!(code, 200); assert_eq!(response["numberOfDocuments"], 0); - assert_eq!(response["isIndexing"], false); + assert!(response["isIndexing"] == false); assert!(response["fieldsDistribution"] .as_object() .unwrap() @@ -41,7 +41,7 @@ async fn stats() { assert_eq!(code, 200); assert_eq!(response["numberOfDocuments"], 2); - assert_eq!(response["isIndexing"], false); + assert!(response["isIndexing"] == false); assert_eq!(response["fieldsDistribution"]["id"], 2); assert_eq!(response["fieldsDistribution"]["name"], 1); assert_eq!(response["fieldsDistribution"]["age"], 1); diff --git a/meilisearch-http/tests/stats/mod.rs b/meilisearch-http/tests/stats/mod.rs index f931d5066..7b9ab10b0 100644 --- a/meilisearch-http/tests/stats/mod.rs +++ b/meilisearch-http/tests/stats/mod.rs @@ -37,7 +37,7 @@ async fn stats() { assert!(response.get("lastUpdate").is_some()); assert!(response["indexes"].get("test").is_some()); assert_eq!(response["indexes"]["test"]["numberOfDocuments"], 0); - assert_eq!(response["indexes"]["test"]["isIndexing"], false); + assert!(response["indexes"]["test"]["isIndexing"] == false); let last_update = response["lastUpdate"].as_str().unwrap(); @@ -68,7 +68,7 @@ async fn stats() { assert!(response["databaseSize"].as_u64().unwrap() > 0); assert!(response["lastUpdate"].as_str().unwrap() > last_update); assert_eq!(response["indexes"]["test"]["numberOfDocuments"], 2); - assert_eq!(response["indexes"]["test"]["isIndexing"], false); + assert!(response["indexes"]["test"]["isIndexing"] == false); assert_eq!(response["indexes"]["test"]["fieldsDistribution"]["id"], 2); assert_eq!(response["indexes"]["test"]["fieldsDistribution"]["name"], 1); assert_eq!(response["indexes"]["test"]["fieldsDistribution"]["age"], 1); From 5d8a21b0defdd7e4f7f52bfbebb07ce511daf5f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar?= Date: Thu, 17 Jun 2021 18:51:07 +0200 Subject: [PATCH 2/2] Fix clippy errors --- meilisearch-http/src/routes/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meilisearch-http/src/routes/mod.rs b/meilisearch-http/src/routes/mod.rs index beddf7ee3..4c5ebbe21 100644 --- a/meilisearch-http/src/routes/mod.rs +++ b/meilisearch-http/src/routes/mod.rs @@ -17,7 +17,7 @@ pub mod settings; pub mod stats; #[derive(Debug, Clone, Serialize, Deserialize)] -#[allow(clippy::clippy::large_enum_variant)] +#[allow(clippy::large_enum_variant)] #[serde(tag = "name")] pub enum UpdateType { ClearAll,