From 2efa1edd9c221629e197e8e34d1e997a8861d90b Mon Sep 17 00:00:00 2001 From: Remi Dettai Date: Tue, 17 Dec 2024 17:18:54 +0100 Subject: [PATCH] Fix clippy lints --- quickwit/quickwit-doc-mapper/src/query_builder.rs | 2 +- quickwit/quickwit-query/src/query_ast/field_presence.rs | 2 +- quickwit/quickwit-query/src/query_ast/utils.rs | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/quickwit/quickwit-doc-mapper/src/query_builder.rs b/quickwit/quickwit-doc-mapper/src/query_builder.rs index ed8e908a4b1..af31bd5030b 100644 --- a/quickwit/quickwit-doc-mapper/src/query_builder.rs +++ b/quickwit/quickwit-doc-mapper/src/query_builder.rs @@ -114,7 +114,7 @@ pub(crate) fn build_query( with_subfields: false, }); fast_field_names.extend(range_query_fast_fields); - fast_field_names.extend(exists_query_fields.fields.into_iter()); + fast_field_names.extend(exists_query_fields.fields); let query = query_ast.build_tantivy_query( &schema, diff --git a/quickwit/quickwit-query/src/query_ast/field_presence.rs b/quickwit/quickwit-query/src/query_ast/field_presence.rs index 62dbb7a1cde..24a6881e2bc 100644 --- a/quickwit/quickwit-query/src/query_ast/field_presence.rs +++ b/quickwit/quickwit-query/src/query_ast/field_presence.rs @@ -116,7 +116,7 @@ impl FieldPresenceQuery { // if `self.field` was not found, it might still be an `object` field if fields.is_empty() || fields[0].1.name() == DYNAMIC_FIELD_NAME { for (field, entry) in find_subfields(&self.field, schema) { - fields.push((field, entry, &"")); + fields.push((field, entry, "")); } } fields diff --git a/quickwit/quickwit-query/src/query_ast/utils.rs b/quickwit/quickwit-query/src/query_ast/utils.rs index 7c557b36926..99f68d6e658 100644 --- a/quickwit/quickwit-query/src/query_ast/utils.rs +++ b/quickwit/quickwit-query/src/query_ast/utils.rs @@ -68,7 +68,6 @@ pub fn find_subfields<'a>( let prefix = format!("{}.", path); schema .fields() - .into_iter() .filter(|(_, field_entry)| field_entry.name().starts_with(&prefix)) .collect() }