mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 02:27:40 +08:00
Fix clippy warnings
This commit is contained in:
parent
993b0d012c
commit
42709ea9a5
@ -98,7 +98,7 @@ impl<'ctx> DatabaseCache<'ctx> {
|
|||||||
[key] => db.get(txn, key)?.map(Cow::Borrowed),
|
[key] => db.get(txn, key)?.map(Cow::Borrowed),
|
||||||
keys => {
|
keys => {
|
||||||
let bitmaps = keys
|
let bitmaps = keys
|
||||||
.into_iter()
|
.iter()
|
||||||
.filter_map(|key| db.get(txn, key).transpose())
|
.filter_map(|key| db.get(txn, key).transpose())
|
||||||
.map(|v| v.map(Cow::Borrowed))
|
.map(|v| v.map(Cow::Borrowed))
|
||||||
.collect::<std::result::Result<Vec<Cow<[u8]>>, _>>()?;
|
.collect::<std::result::Result<Vec<Cow<[u8]>>, _>>()?;
|
||||||
|
@ -75,7 +75,7 @@ impl<'ctx> SearchContext<'ctx> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn searchable_attributes(&mut self, searchable_attributes: &'ctx [String]) -> Result<()> {
|
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 =
|
let restricted_fids =
|
||||||
searchable_attributes.iter().filter_map(|name| fids_map.id(name)).collect();
|
searchable_attributes.iter().filter_map(|name| fids_map.id(name)).collect();
|
||||||
self.restricted_fids = Some(restricted_fids);
|
self.restricted_fids = Some(restricted_fids);
|
||||||
|
Loading…
Reference in New Issue
Block a user