make clippy happy 2

This commit is contained in:
mpostma 2020-06-27 15:10:39 +02:00
parent 21253a2bcb
commit 4f6a6b1359
9 changed files with 14 additions and 7 deletions

View file

@ -33,6 +33,7 @@ pub struct SortResult {
pub exhaustive_facets_count: Option<bool>,
}
#[allow(clippy::too_many_arguments)]
pub fn bucket_sort<'c, FI>(
reader: &heed::RoTxn<MainT>,
query: &str,
@ -192,6 +193,7 @@ where
Ok(result)
}
#[allow(clippy::too_many_arguments)]
pub fn bucket_sort_with_distinct<'c, FI, FD>(
reader: &heed::RoTxn<MainT>,
query: &str,

View file

@ -92,6 +92,7 @@ impl<'a> CriteriaBuilder<'a> {
self.inner.reserve(additional)
}
#[allow(clippy::should_implement_trait)]
pub fn add<C: 'a>(mut self, criterion: C) -> CriteriaBuilder<'a>
where
C: Criterion,

View file

@ -22,6 +22,7 @@ impl Criterion for Typo {
// It is safe to panic on input number higher than 3,
// the number of typos is never bigger than that.
#[inline]
#[allow(clippy::approx_constant)]
fn custom_log10(n: u8) -> f32 {
match n {
0 => 0.0, // log(1)

View file

@ -1,3 +1,5 @@
#![allow(clippy::type_complexity)]
#[cfg(test)]
#[macro_use]
extern crate assert_matches;

View file

@ -19,6 +19,7 @@ impl QueryWordsMapper {
QueryWordsMapper { originals, mappings: HashMap::new() }
}
#[allow(clippy::len_zero)]
pub fn declare<I, A>(&mut self, range: Range<usize>, id: QueryId, replacement: I)
where I: IntoIterator<Item = A>,
A: ToString,

View file

@ -109,6 +109,7 @@ pub fn push_documents_addition<D: serde::Serialize>(
Ok(last_update_id)
}
#[allow(clippy::too_many_arguments)]
fn index_document<A>(
writer: &mut heed::RwTxn<MainT>,
documents_fields: DocumentsFields,