Apply suggestions from code review

Co-authored-by: Tamo <tamo@meilisearch.com>
This commit is contained in:
Loïc Lecrenier
2022-06-16 06:19:33 +02:00
committed by Loïc Lecrenier
parent bd15f5625a
commit 392472f4bb
4 changed files with 5 additions and 8 deletions

View File

@ -551,7 +551,7 @@ fn biggest_value_sizes(index: &Index, rtxn: &heed::RoTxn, limit: usize) -> anyho
let db = facet_id_exists_docids.remap_data_type::<ByteSlice>();
for result in facet_values_iter(rtxn, db, facet_id)? {
let (_fid, value) = result?;
let key = format!("{}", facet_name);
let key = facet_name.to_string();
heap.push(Reverse((value.len(), key, facet_id_exists_docids_name)));
if heap.len() > limit {
heap.pop();