From 3aff338732b729af5b9879e51b3fd413c78d04bd Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Thu, 28 Mar 2024 17:27:56 -0600 Subject: [PATCH] rename trait --- ssz-rs/src/boolean.rs | 4 ++-- ssz-rs/src/merkleization/proofs.rs | 2 +- ssz-rs/src/uint.rs | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ssz-rs/src/boolean.rs b/ssz-rs/src/boolean.rs index 1c3821c2..ff86ab68 100644 --- a/ssz-rs/src/boolean.rs +++ b/ssz-rs/src/boolean.rs @@ -3,7 +3,7 @@ use crate::{ lib::*, merkleization::{ prove_primitive, GeneralizedIndex, GeneralizedIndexable, HashTreeRoot, MerkleizationError, - Node, ProofAndWitness, Prover, + Node, ProofAndWitness, Prove, }, ser::{Serialize, SerializeError}, Serializable, SimpleSerialize, @@ -56,7 +56,7 @@ impl HashTreeRoot for bool { } } -impl Prover for bool { +impl Prove for bool { fn prove(&mut self, index: GeneralizedIndex) -> Result { prove_primitive(self, index) } diff --git a/ssz-rs/src/merkleization/proofs.rs b/ssz-rs/src/merkleization/proofs.rs index 12ba60d8..59bc81a2 100644 --- a/ssz-rs/src/merkleization/proofs.rs +++ b/ssz-rs/src/merkleization/proofs.rs @@ -46,7 +46,7 @@ pub fn prove_primitive( } /// Types that can produce Merkle proofs against themselves given a `GeneralizedIndex`. -pub trait Prover { +pub trait Prove { /// Provide a Merkle proof of the node in this type's merkle tree corresponding to the `index`. fn prove(&mut self, index: GeneralizedIndex) -> Result; } diff --git a/ssz-rs/src/uint.rs b/ssz-rs/src/uint.rs index 17142de6..50f38756 100644 --- a/ssz-rs/src/uint.rs +++ b/ssz-rs/src/uint.rs @@ -3,7 +3,7 @@ use crate::{ lib::*, merkleization::{ pack_bytes, prove_primitive, GeneralizedIndex, GeneralizedIndexable, HashTreeRoot, - MerkleizationError, Node, ProofAndWitness, Prover, + MerkleizationError, Node, ProofAndWitness, Prove, }, ser::{Serialize, SerializeError}, Serializable, SimpleSerialize, BITS_PER_BYTE, @@ -68,7 +68,7 @@ macro_rules! define_uint { } } - impl Prover for $uint { + impl Prove for $uint { fn prove( &mut self, index: GeneralizedIndex, @@ -148,7 +148,7 @@ impl HashTreeRoot for U256 { } } -impl Prover for U256 { +impl Prove for U256 { fn prove(&mut self, index: GeneralizedIndex) -> Result { prove_primitive(self, index) }