From 42709ea9a5eb46431cc09db1e192d66f60572357 Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Tue, 13 Jun 2023 18:52:02 +0200 Subject: [PATCH] Fix clippy warnings --- milli/src/search/new/db_cache.rs | 2 +- milli/src/search/new/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/milli/src/search/new/db_cache.rs b/milli/src/search/new/db_cache.rs index 6c1b0f7f8..e6b3b96bc 100644 --- a/milli/src/search/new/db_cache.rs +++ b/milli/src/search/new/db_cache.rs @@ -98,7 +98,7 @@ impl<'ctx> DatabaseCache<'ctx> { [key] => db.get(txn, key)?.map(Cow::Borrowed), keys => { let bitmaps = keys - .into_iter() + .iter() .filter_map(|key| db.get(txn, key).transpose()) .map(|v| v.map(Cow::Borrowed)) .collect::>, _>>()?; diff --git a/milli/src/search/new/mod.rs b/milli/src/search/new/mod.rs index 6cc155c56..015940945 100644 --- a/milli/src/search/new/mod.rs +++ b/milli/src/search/new/mod.rs @@ -75,7 +75,7 @@ impl<'ctx> SearchContext<'ctx> { } pub fn searchable_attributes(&mut self, searchable_attributes: &'ctx [String]) -> Result<()> { - let fids_map = self.index.fields_ids_map(&self.txn)?; + let fids_map = self.index.fields_ids_map(self.txn)?; let restricted_fids = searchable_attributes.iter().filter_map(|name| fids_map.id(name)).collect(); self.restricted_fids = Some(restricted_fids);