mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-29 02:33:48 +00:00
Fix Rust 1.83 Clippy lints (#6629)
* Fix Rust 1.83 Clippy lints * Cargo fmt
This commit is contained in:
@@ -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)
|
||||
}
|
||||
};
|
||||
|
||||
@@ -99,7 +99,7 @@ impl<'de> Deserialize<'de> for G1Point {
|
||||
{
|
||||
struct G1PointVisitor;
|
||||
|
||||
impl<'de> Visitor<'de> for G1PointVisitor {
|
||||
impl Visitor<'_> for G1PointVisitor {
|
||||
type Value = G1Point;
|
||||
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
formatter.write_str("A 48 byte hex encoded string")
|
||||
@@ -135,7 +135,7 @@ impl<'de> Deserialize<'de> for G2Point {
|
||||
{
|
||||
struct G2PointVisitor;
|
||||
|
||||
impl<'de> Visitor<'de> for G2PointVisitor {
|
||||
impl Visitor<'_> for G2PointVisitor {
|
||||
type Value = G2Point;
|
||||
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
formatter.write_str("A 96 byte hex encoded string")
|
||||
|
||||
Reference in New Issue
Block a user