mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-30 00:34:26 +01:00
Merge #215
215: Fix Clippy errors r=irevoire a=curquiza Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
This commit is contained in:
commit
5f08e41a85
@ -17,7 +17,7 @@ pub mod settings;
|
|||||||
pub mod stats;
|
pub mod stats;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
#[allow(clippy::clippy::large_enum_variant)]
|
#[allow(clippy::large_enum_variant)]
|
||||||
#[serde(tag = "name")]
|
#[serde(tag = "name")]
|
||||||
pub enum UpdateType {
|
pub enum UpdateType {
|
||||||
ClearAll,
|
ClearAll,
|
||||||
|
@ -14,7 +14,7 @@ async fn stats() {
|
|||||||
|
|
||||||
assert_eq!(code, 200);
|
assert_eq!(code, 200);
|
||||||
assert_eq!(response["numberOfDocuments"], 0);
|
assert_eq!(response["numberOfDocuments"], 0);
|
||||||
assert_eq!(response["isIndexing"], false);
|
assert!(response["isIndexing"] == false);
|
||||||
assert!(response["fieldsDistribution"]
|
assert!(response["fieldsDistribution"]
|
||||||
.as_object()
|
.as_object()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
@ -41,7 +41,7 @@ async fn stats() {
|
|||||||
|
|
||||||
assert_eq!(code, 200);
|
assert_eq!(code, 200);
|
||||||
assert_eq!(response["numberOfDocuments"], 2);
|
assert_eq!(response["numberOfDocuments"], 2);
|
||||||
assert_eq!(response["isIndexing"], false);
|
assert!(response["isIndexing"] == false);
|
||||||
assert_eq!(response["fieldsDistribution"]["id"], 2);
|
assert_eq!(response["fieldsDistribution"]["id"], 2);
|
||||||
assert_eq!(response["fieldsDistribution"]["name"], 1);
|
assert_eq!(response["fieldsDistribution"]["name"], 1);
|
||||||
assert_eq!(response["fieldsDistribution"]["age"], 1);
|
assert_eq!(response["fieldsDistribution"]["age"], 1);
|
||||||
|
@ -37,7 +37,7 @@ async fn stats() {
|
|||||||
assert!(response.get("lastUpdate").is_some());
|
assert!(response.get("lastUpdate").is_some());
|
||||||
assert!(response["indexes"].get("test").is_some());
|
assert!(response["indexes"].get("test").is_some());
|
||||||
assert_eq!(response["indexes"]["test"]["numberOfDocuments"], 0);
|
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();
|
let last_update = response["lastUpdate"].as_str().unwrap();
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ async fn stats() {
|
|||||||
assert!(response["databaseSize"].as_u64().unwrap() > 0);
|
assert!(response["databaseSize"].as_u64().unwrap() > 0);
|
||||||
assert!(response["lastUpdate"].as_str().unwrap() > last_update);
|
assert!(response["lastUpdate"].as_str().unwrap() > last_update);
|
||||||
assert_eq!(response["indexes"]["test"]["numberOfDocuments"], 2);
|
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"]["id"], 2);
|
||||||
assert_eq!(response["indexes"]["test"]["fieldsDistribution"]["name"], 1);
|
assert_eq!(response["indexes"]["test"]["fieldsDistribution"]["name"], 1);
|
||||||
assert_eq!(response["indexes"]["test"]["fieldsDistribution"]["age"], 1);
|
assert_eq!(response["indexes"]["test"]["fieldsDistribution"]["age"], 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user