Skip to content

Commit

Permalink
Remove unused sort for segment meta list
Browse files Browse the repository at this point in the history
  • Loading branch information
k-yomo committed Nov 26, 2021
1 parent c412a46 commit d3ccfff
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/indexer/segment_register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,11 @@ impl SegmentRegister {
}

pub fn segment_metas(&self) -> Vec<SegmentMeta> {
let mut segment_ids: Vec<SegmentMeta> = self
return self
.segment_states
.values()
.map(|segment_entry| segment_entry.meta().clone())
.collect();
segment_ids.sort_by_key(SegmentMeta::id);
segment_ids
}

pub fn contains_all(&self, segment_ids: &[SegmentId]) -> bool {
Expand Down

0 comments on commit d3ccfff

Please sign in to comment.