clippy: fix/allow needless_range_loop

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler
2021-01-19 15:03:04 +01:00
parent 0d2133db98
commit 382f10a0cc
3 changed files with 7 additions and 9 deletions

View File

@ -51,6 +51,7 @@ pub static IPV4_REVERSE_MASK: &[&str] = &[
lazy_static! {
pub static ref IPV4_MASK_HASH_LOCALNET: HashMap<&'static str, u8> = {
let mut map = HashMap::new();
#[allow(clippy::needless_range_loop)]
for i in 8..32 {
map.insert(IPV4_REVERSE_MASK[i], i as u8);
}