From 3c1640f41a72561563285dddaa775be5936378d2 Mon Sep 17 00:00:00 2001 From: Grant Wuerker Date: Sat, 20 Oct 2018 19:20:01 -0500 Subject: [PATCH] moved suppress warning tag --- beacon_chain/utils/ssz/src/encode.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/beacon_chain/utils/ssz/src/encode.rs b/beacon_chain/utils/ssz/src/encode.rs index 91753bacf..74a94605a 100644 --- a/beacon_chain/utils/ssz/src/encode.rs +++ b/beacon_chain/utils/ssz/src/encode.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(feature = "clippy"), allow(needless_range_loop))] - use super::{ LENGTH_BYTES }; @@ -80,6 +78,7 @@ pub fn encode_length(len: usize, length_bytes: usize) -> Vec { assert!(length_bytes > 0); // For sanity assert!((len as usize) < 2usize.pow(length_bytes as u32 * 8)); let mut header: Vec = vec![0; length_bytes]; + #[allow(needless_range_loop)] for i in 0..length_bytes { let offset = (length_bytes - i - 1) * 8; header[i] = ((len >> offset) & 0xff) as u8;