mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-23 19:57:30 +01:00
Fix cargo clippy error
This commit is contained in:
parent
d0ec081e49
commit
446b66b0fe
@ -182,7 +182,7 @@ impl Index {
|
|||||||
highlight = f.highlight;
|
highlight = f.highlight;
|
||||||
}
|
}
|
||||||
formatted_options.insert(id, FormatOptions {
|
formatted_options.insert(id, FormatOptions {
|
||||||
highlight: highlight,
|
highlight,
|
||||||
crop: attr_len,
|
crop: attr_len,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -195,7 +195,7 @@ impl Index {
|
|||||||
highlight = f.highlight;
|
highlight = f.highlight;
|
||||||
}
|
}
|
||||||
formatted_options.insert(id, FormatOptions {
|
formatted_options.insert(id, FormatOptions {
|
||||||
highlight: highlight,
|
highlight,
|
||||||
crop: attr_len,
|
crop: attr_len,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -362,14 +362,14 @@ fn compute_formatted<A: AsRef<[u8]>>(
|
|||||||
obkv: obkv::KvReader,
|
obkv: obkv::KvReader,
|
||||||
formatter: &Formatter<A>,
|
formatter: &Formatter<A>,
|
||||||
matching_words: &impl Matcher,
|
matching_words: &impl Matcher,
|
||||||
ids_in_formatted: &Vec<FieldId>,
|
ids_in_formatted: &[FieldId],
|
||||||
formatted_options: &HashMap<FieldId, FormatOptions>,
|
formatted_options: &HashMap<FieldId, FormatOptions>,
|
||||||
// to_highlight_fields: &HashSet<FieldId>, //ICI
|
// to_highlight_fields: &HashSet<FieldId>, //ICI
|
||||||
// to_crop_fields: &HashMap<FieldId, Option<usize>>, //ICI
|
// to_crop_fields: &HashMap<FieldId, Option<usize>>, //ICI
|
||||||
) -> anyhow::Result<Document> {
|
) -> anyhow::Result<Document> {
|
||||||
let mut document = Document::new();
|
let mut document = Document::new();
|
||||||
|
|
||||||
if formatted_options.len() > 0 {
|
if !formatted_options.is_empty() {
|
||||||
for field in ids_in_formatted {
|
for field in ids_in_formatted {
|
||||||
if let Some(value) = obkv.get(*field) {
|
if let Some(value) = obkv.get(*field) {
|
||||||
let mut value: Value = serde_json::from_slice(value)?;
|
let mut value: Value = serde_json::from_slice(value)?;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user