Fix clippy warnings.

This commit fixes the current set of (stable) clippy warnings in the repo.
This commit is contained in:
Peter Huene
2019-10-23 23:15:42 -07:00
committed by Andrew Brown
parent 1176e4f178
commit 9f506692c2
93 changed files with 667 additions and 662 deletions

View File

@@ -126,8 +126,7 @@ where
// `(i + 1) * 8` = Last bit in byte.
// `last - byte.leading_zeros()` = last set bit in byte.
// `as usize` won't ever truncate as the potential range is `0..=8`.
.map(|(i, byte)| ((i + 1) * 8) - byte.leading_zeros() as usize)
.unwrap_or(0);
.map_or(0, |(i, byte)| ((i + 1) * 8) - byte.leading_zeros() as usize);
Some(K::new(last_index))
}