mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
feat: Use safest SetBuf constructor instead of new_unchecked
This commit is contained in:
parent
8387c5b14e
commit
fa099555c0
4 changed files with 9 additions and 18 deletions
|
@ -70,11 +70,8 @@ impl Indexer {
|
|||
pub fn build(self) -> Indexed {
|
||||
let words_doc_indexes = self.words_doc_indexes
|
||||
.into_iter()
|
||||
.map(|(word, mut indexes)| {
|
||||
indexes.sort_unstable();
|
||||
indexes.dedup();
|
||||
(word, SetBuf::new_unchecked(indexes))
|
||||
}).collect();
|
||||
.map(|(word, indexes)| (word, SetBuf::from_dirty(indexes)))
|
||||
.collect();
|
||||
|
||||
let docs_words = self.docs_words
|
||||
.into_iter()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue