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

@ -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)