mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
Apply code suggestions
Co-authored-by: Clément Renault <clement@meilisearch.com>
This commit is contained in:
parent
399fba16bb
commit
00f78d6b5a
3 changed files with 12 additions and 14 deletions
|
@ -3,9 +3,9 @@ use serde_json::Value;
|
|||
/// Your json MUST BE valid and generated by `serde_json::to_vec` before being
|
||||
/// sent in this function. This function is DUMB and FAST but makes a lot of
|
||||
/// asumption about the way `serde_json` will generate its input.
|
||||
/// Will returns `true` if the json contains an object, an array of array
|
||||
/// or an array containing an object.
|
||||
/// Returns `false` for everything else.
|
||||
///
|
||||
/// Will return `true` if the JSON contains an object, an array of array
|
||||
/// or an array containing an object. Returns `false` for everything else.
|
||||
pub fn should_flatten_from_unchecked_slice(json: &[u8]) -> bool {
|
||||
if json.is_empty() {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue