Fix Rust 1.83 Clippy lints (#6629)

* Fix Rust 1.83 Clippy lints

* Cargo fmt
This commit is contained in:
Michael Sproul
2024-11-29 13:23:54 +11:00
committed by GitHub
parent 38f5f665e1
commit fa6c4c02a3
35 changed files with 73 additions and 77 deletions

View File

@@ -20,7 +20,7 @@ macro_rules! impl_tree_hash {
// but benchmarks have show that to be at least 15% slower because of the
// unnecessary copying and allocation (one Vec per byte)
let values_per_chunk = tree_hash::BYTES_PER_CHUNK;
let minimum_chunk_count = ($byte_size + values_per_chunk - 1) / values_per_chunk;
let minimum_chunk_count = $byte_size.div_ceil(values_per_chunk);
tree_hash::merkle_root(&self.serialize(), minimum_chunk_count)
}
};