Skip to content

Commit

Permalink
rename trait
Browse files Browse the repository at this point in the history
  • Loading branch information
ralexstokes committed Mar 29, 2024
1 parent 96a7227 commit 3aff338
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ssz-rs/src/boolean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -56,7 +56,7 @@ impl HashTreeRoot for bool {
}
}

impl Prover for bool {
impl Prove for bool {
fn prove(&mut self, index: GeneralizedIndex) -> Result<ProofAndWitness, MerkleizationError> {
prove_primitive(self, index)
}
Expand Down
2 changes: 1 addition & 1 deletion ssz-rs/src/merkleization/proofs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub fn prove_primitive<T: HashTreeRoot + ?Sized>(
}

/// 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<ProofAndWitness, Error>;
}
Expand Down
6 changes: 3 additions & 3 deletions ssz-rs/src/uint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -68,7 +68,7 @@ macro_rules! define_uint {
}
}

impl Prover for $uint {
impl Prove for $uint {
fn prove(
&mut self,
index: GeneralizedIndex,
Expand Down Expand Up @@ -148,7 +148,7 @@ impl HashTreeRoot for U256 {
}
}

impl Prover for U256 {
impl Prove for U256 {
fn prove(&mut self, index: GeneralizedIndex) -> Result<ProofAndWitness, MerkleizationError> {
prove_primitive(self, index)
}
Expand Down

0 comments on commit 3aff338

Please sign in to comment.