mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-01-19 09:35:51 +08:00
Fix clippy errors
This commit is contained in:
parent
79a1212ebe
commit
1ef061d92b
@ -154,10 +154,10 @@ impl Index {
|
|||||||
&displayed_ids,
|
&displayed_ids,
|
||||||
);
|
);
|
||||||
|
|
||||||
// All attributes present in `_formatted`:
|
// All attributes present in `_formatted` are:
|
||||||
// - attributes asked to be highlighted or cropped (with `attributesToCrop` or `attributesToHighlight`)
|
// - the attributes asked to be highlighted or cropped (with `attributesToCrop` or `attributesToHighlight`)
|
||||||
// - attributes asked to be retrieved: these attributes will not be formatted
|
// - the attributes asked to be retrieved: these attributes will not be highlighted/cropped
|
||||||
// - attributes that are present in displayed attributes
|
// But these attributes must be present in displayed attributes
|
||||||
let ids_in_formatted = formatted_options
|
let ids_in_formatted = formatted_options
|
||||||
.keys()
|
.keys()
|
||||||
.cloned()
|
.cloned()
|
||||||
@ -427,7 +427,7 @@ impl<'a, A: AsRef<[u8]>> Formatter<'a, A> {
|
|||||||
let mut buffer = VecDeque::new();
|
let mut buffer = VecDeque::new();
|
||||||
let mut tokens = analyzed.reconstruct().peekable();
|
let mut tokens = analyzed.reconstruct().peekable();
|
||||||
let mut taken_before = 0;
|
let mut taken_before = 0;
|
||||||
while let Some((word, token)) = tokens.next_if(|(_, token)| !matcher.matches(token.text()).is_some()) {
|
while let Some((word, token)) = tokens.next_if(|(_, token)| matcher.matches(token.text()).is_none()) {
|
||||||
buffer.push_back((word, token));
|
buffer.push_back((word, token));
|
||||||
taken_before += word.chars().count();
|
taken_before += word.chars().count();
|
||||||
while taken_before > crop_len {
|
while taken_before > crop_len {
|
||||||
|
Loading…
Reference in New Issue
Block a user