Skip to content

Commit

Permalink
Merge pull request #1663 from PSeitz/fix_clippy
Browse files Browse the repository at this point in the history
fix clippy
  • Loading branch information
PSeitz authored Nov 7, 2022
2 parents e948889 + 38ad46e commit 666afcf
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion common/src/vint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ fn vint_len(data: &[u8]) -> usize {
/// If the buffer does not start by a valid
/// vint payload
pub fn read_u32_vint(data: &mut &[u8]) -> u32 {
let (result, vlen) = read_u32_vint_no_advance(*data);
let (result, vlen) = read_u32_vint_no_advance(data);
*data = &data[vlen..];
result
}
Expand Down
2 changes: 1 addition & 1 deletion src/collector/facet_collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ mod tests {
.map(|mut doc| {
doc.add_facet(
facet_field,
&format!("/facet/{}", thread_rng().sample(&uniform)),
&format!("/facet/{}", thread_rng().sample(uniform)),
);
doc
})
Expand Down
2 changes: 1 addition & 1 deletion src/core/index_meta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl SegmentMeta {
/// associated with a segment component.
pub fn relative_path(&self, component: SegmentComponent) -> PathBuf {
let mut path = self.id().uuid_string();
path.push_str(&*match component {
path.push_str(&match component {
SegmentComponent::Postings => ".idx".to_string(),
SegmentComponent::Positions => ".pos".to_string(),
SegmentComponent::Terms => ".term".to_string(),
Expand Down
2 changes: 1 addition & 1 deletion src/directory/directory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl<T: Send + Sync + 'static> From<Box<T>> for DirectoryLock {

impl Drop for DirectoryLockGuard {
fn drop(&mut self) {
if let Err(e) = self.directory.delete(&*self.path) {
if let Err(e) = self.directory.delete(&self.path) {
error!("Failed to remove the lock file. {:?}", e);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/indexer/merger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ impl IndexMerger {
// Let's compute the list of non-empty posting lists
for (segment_ord, term_info) in merged_terms.current_segment_ords_and_term_infos() {
let segment_reader = &self.readers[segment_ord];
let inverted_index: &InvertedIndexReader = &*field_readers[segment_ord];
let inverted_index: &InvertedIndexReader = &field_readers[segment_ord];
let segment_postings = inverted_index
.read_postings_from_terminfo(&term_info, segment_postings_option)?;
let alive_bitset_opt = segment_reader.alive_bitset();
Expand Down
2 changes: 1 addition & 1 deletion src/query/automaton_weight.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ where
&'a self,
term_dict: &'a TermDictionary,
) -> io::Result<TermStreamer<'a, &'a A>> {
let automaton: &A = &*self.automaton;
let automaton: &A = &self.automaton;
let term_stream_builder = term_dict.search(automaton);
term_stream_builder.into_stream()
}
Expand Down
4 changes: 2 additions & 2 deletions src/query/union.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ impl<TScorer: Scorer, TScoreCombiner: ScoreCombiner> Union<TScorer, TScoreCombin
self.doc = min_doc;
refill(
&mut self.docsets,
&mut *self.bitsets,
&mut *self.scores,
&mut self.bitsets,
&mut self.scores,
min_doc,
);
true
Expand Down
6 changes: 3 additions & 3 deletions src/termdict/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,10 @@ fn test_empty_string() -> crate::Result<()> {
let buffer: Vec<u8> = {
let mut term_dictionary_builder = TermDictionaryBuilder::create(vec![]).unwrap();
term_dictionary_builder
.insert(&[], &make_term_info(1_u64))
.insert([], &make_term_info(1_u64))
.unwrap();
term_dictionary_builder
.insert(&[1u8], &make_term_info(2_u64))
.insert([1u8], &make_term_info(2_u64))
.unwrap();
term_dictionary_builder.finish()?
};
Expand All @@ -252,7 +252,7 @@ fn stream_range_test_dict() -> crate::Result<TermDictionary> {
let mut term_dictionary_builder = TermDictionaryBuilder::create(Vec::new())?;
for i in 0u8..10u8 {
let number_arr = [i; 1];
term_dictionary_builder.insert(&number_arr, &make_term_info(i as u64))?;
term_dictionary_builder.insert(number_arr, &make_term_info(i as u64))?;
}
term_dictionary_builder.finish()?
};
Expand Down

0 comments on commit 666afcf

Please sign in to comment.