mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
make clippy happy 2
This commit is contained in:
parent
21253a2bcb
commit
4f6a6b1359
9 changed files with 14 additions and 7 deletions
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue