Skip to content

Commit

Permalink
Merge pull request #9 from quantleaf/lint-fix
Browse files Browse the repository at this point in the history
Remove unecessary mutable ref
  • Loading branch information
marcus-pousette committed Jan 12, 2022
2 parents e4811d8 + f6db9ef commit a41b743
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Arguments
returns Array of QueryResult structs
*/
pub fn query<T: Eq + Hash + Clone + Debug, M, S: ScoreCalculator<T, M>>(
mut index: &mut Index<T>,
index: &mut Index<T>,
query: &str,
score_calculator: &mut S,
tokenizer: Tokenizer,
Expand All @@ -86,7 +86,7 @@ pub fn query<T: Eq + Hash + Clone + Debug, M, S: ScoreCalculator<T, M>>(
find_inverted_index_node(index.root, &query_term_expanded, &index.arena_index);
if let Some(term_node_index) = term_node_option {
let document_frequency =
disconnect_and_count_documents(&mut index, term_node_index, removed);
disconnect_and_count_documents(index, term_node_index, removed);
let term_node = index.arena_index.get(term_node_index).unwrap();
if let Some(term_node_option_first_doc) = term_node.first_doc {
if document_frequency > 0 {
Expand Down

0 comments on commit a41b743

Please sign in to comment.