Make clippy happy

This commit is contained in:
Clément Renault 2023-04-26 18:35:06 +02:00 committed by Louis Dureuil
parent 702041b7e1
commit f36de2115f
No known key found for this signature in database
3 changed files with 4 additions and 4 deletions

View File

@ -315,7 +315,7 @@ fn prepare_search<'t>(
query: &'t SearchQuery, query: &'t SearchQuery,
features: RoFeatures, features: RoFeatures,
) -> Result<(milli::Search<'t>, bool, usize, usize), MeilisearchHttpError> { ) -> Result<(milli::Search<'t>, bool, usize, usize), MeilisearchHttpError> {
let mut search = index.search(&rtxn); let mut search = index.search(rtxn);
if query.vector.is_some() && query.q.is_some() { if query.vector.is_some() && query.q.is_some() {
warn!("Ignoring the query string `q` when used with the `vector` parameter."); warn!("Ignoring the query string `q` when used with the `vector` parameter.");
@ -337,7 +337,7 @@ fn prepare_search<'t>(
search.terms_matching_strategy(query.matching_strategy.into()); search.terms_matching_strategy(query.matching_strategy.into());
let max_total_hits = index let max_total_hits = index
.pagination_max_total_hits(&rtxn) .pagination_max_total_hits(rtxn)
.map_err(milli::Error::from)? .map_err(milli::Error::from)?
.unwrap_or(DEFAULT_PAGINATION_MAX_TOTAL_HITS); .unwrap_or(DEFAULT_PAGINATION_MAX_TOTAL_HITS);

View File

@ -18,6 +18,6 @@ impl<'a> BytesDecode<'a> for FstSetCodec {
type DItem = Set<&'a [u8]>; type DItem = Set<&'a [u8]>;
fn bytes_decode(bytes: &'a [u8]) -> Option<Self::DItem> { fn bytes_decode(bytes: &'a [u8]) -> Option<Self::DItem> {
Some(Set::new(bytes).ok()?) Set::new(bytes).ok()
} }
} }

View File

@ -163,7 +163,7 @@ impl<'i> FacetsUpdate<'i> {
let mut text_fsts = vec![]; let mut text_fsts = vec![];
let mut current_fst: Option<(u16, fst::SetBuilder<Vec<u8>>)> = None; let mut current_fst: Option<(u16, fst::SetBuilder<Vec<u8>>)> = None;
let database = self.index.facet_id_string_docids.remap_data_type::<DecodeIgnore>(); let database = self.index.facet_id_string_docids.remap_data_type::<DecodeIgnore>();
for result in database.iter(&wtxn)? { for result in database.iter(wtxn)? {
let (facet_group_key, _) = result?; let (facet_group_key, _) = result?;
if let FacetGroupKey { field_id, level: 0, left_bound } = facet_group_key { if let FacetGroupKey { field_id, level: 0, left_bound } = facet_group_key {
current_fst = match current_fst.take() { current_fst = match current_fst.take() {