Fix clippy errors

This commit is contained in:
Clémentine Urquizar 2021-06-17 18:50:18 +02:00
parent 2f2484e186
commit 9e8888b603
No known key found for this signature in database
GPG Key ID: D8E7CC7422E77E1A
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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);