Skip to content

Commit 20f61b2

Browse files
committed
Revert clippy change that is unnecessary with proper rustup update
Signed-off-by: Jacinta Ferrant <jacinta.ferrant@gmail.com>
1 parent 49c52df commit 20f61b2

File tree

1 file changed

+3
-11
lines changed
  • stackslib/src/chainstate/burn

1 file changed

+3
-11
lines changed

stackslib/src/chainstate/burn/mod.rs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -158,17 +158,9 @@ impl SortitionHash {
158158

159159
/// Convert a SortitionHash into a (little-endian) uint256
160160
pub fn to_uint256(&self) -> Uint256 {
161-
let chunks = self.0.chunks_exact(8);
162-
let remainder = chunks.remainder();
163-
164-
let u64_chunks: Vec<[u8; 8]> = chunks
165-
.map(|chunk| chunk.try_into().expect("chunk size should be 8"))
166-
.collect();
167-
168-
assert!(
169-
remainder.is_empty(),
170-
"SortitionHash was not evenly divisible by 8"
171-
);
161+
let (u64_chunks, []) = self.0.as_chunks::<8>() else {
162+
panic!("SortitionHash was not evenly divisible by 8")
163+
};
172164

173165
let tmp: Vec<u64> = u64_chunks
174166
.iter()

0 commit comments

Comments
 (0)