Skip to content

Commit

Permalink
Using sort unstable by key.
Browse files Browse the repository at this point in the history
  • Loading branch information
fulmicoton committed Sep 6, 2018
1 parent b3b2421 commit 1d439e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/postings/postings_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl MultiFieldPostingsWriter {
.iter()
.map(|(term_bytes, addr, bucket_id)| (term_bytes, addr, bucket_id as UnorderedTermId))
.collect();
term_offsets.sort_by_key(|&(k, _, _)| k);
term_offsets.sort_unstable_by_key(|&(k, _, _)| k);

let mut offsets: Vec<(Field, usize)> = vec![];
let term_offsets_it = term_offsets
Expand Down

0 comments on commit 1d439e9

Please sign in to comment.