mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 12:05:05 +08:00
Make clippy happy (again)
This commit is contained in:
parent
4570d5bf3a
commit
764df24b7d
@ -214,8 +214,7 @@ impl SearchRules {
|
|||||||
map.iter()
|
map.iter()
|
||||||
.filter(|(pattern, _)| pattern.matches_str(index))
|
.filter(|(pattern, _)| pattern.matches_str(index))
|
||||||
.max_by_key(|(pattern, _)| (pattern.is_exact(), pattern.len()))
|
.max_by_key(|(pattern, _)| (pattern.is_exact(), pattern.len()))
|
||||||
.map(|(_, rule)| rule.clone())
|
.and_then(|(_, rule)| rule.clone())
|
||||||
.flatten()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -445,7 +445,7 @@ async fn access_authorized_index_patterns() {
|
|||||||
|
|
||||||
// use created key.
|
// use created key.
|
||||||
let key = response["key"].as_str().unwrap();
|
let key = response["key"].as_str().unwrap();
|
||||||
server.use_api_key(&key);
|
server.use_api_key(key);
|
||||||
|
|
||||||
// refer to products_1 and products with modified api key.
|
// refer to products_1 and products with modified api key.
|
||||||
let index_1 = server.index("products_1");
|
let index_1 = server.index("products_1");
|
||||||
@ -515,7 +515,7 @@ async fn raise_error_non_authorized_index_patterns() {
|
|||||||
|
|
||||||
// use created key.
|
// use created key.
|
||||||
let key = response["key"].as_str().unwrap();
|
let key = response["key"].as_str().unwrap();
|
||||||
server.use_api_key(&key);
|
server.use_api_key(key);
|
||||||
|
|
||||||
// refer to products_1 and products_2 with modified api key.
|
// refer to products_1 and products_2 with modified api key.
|
||||||
let product_1_index = server.index("products_1");
|
let product_1_index = server.index("products_1");
|
||||||
@ -582,7 +582,7 @@ async fn pattern_indexes() {
|
|||||||
let (response, code) = server.add_api_key(content).await;
|
let (response, code) = server.add_api_key(content).await;
|
||||||
assert_eq!(201, code, "{:?}", &response);
|
assert_eq!(201, code, "{:?}", &response);
|
||||||
let key = response["key"].as_str().expect("Key is not string");
|
let key = response["key"].as_str().expect("Key is not string");
|
||||||
server.use_api_key(&key);
|
server.use_api_key(key);
|
||||||
|
|
||||||
// Create Index products_1 using generated api key
|
// Create Index products_1 using generated api key
|
||||||
let products_1 = server.index("products_1");
|
let products_1 = server.index("products_1");
|
||||||
@ -859,7 +859,7 @@ async fn lazy_create_index_from_pattern() {
|
|||||||
|
|
||||||
// use created key.
|
// use created key.
|
||||||
let key = response["key"].as_str().unwrap();
|
let key = response["key"].as_str().unwrap();
|
||||||
server.use_api_key(&key);
|
server.use_api_key(key);
|
||||||
|
|
||||||
// try to create a index via add documents route
|
// try to create a index via add documents route
|
||||||
let index = server.index("products_1");
|
let index = server.index("products_1");
|
||||||
|
Loading…
Reference in New Issue
Block a user