From 470164ae91815e05e7cb3d3ac530648874f48893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Garillot?= Date: Fri, 14 Jul 2023 17:46:18 -0400 Subject: [PATCH] fix: rename Len::len -> Len::length to avoid unrelated clippy lint --- src/provider/pedersen.rs | 2 +- src/spartan/ppsnark.rs | 2 +- src/traits/commitment.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/provider/pedersen.rs b/src/provider/pedersen.rs index 8c09954a4..d1a0389c0 100644 --- a/src/provider/pedersen.rs +++ b/src/provider/pedersen.rs @@ -23,7 +23,7 @@ pub struct CommitmentKey { } impl Len for CommitmentKey { - fn len(&self) -> usize { + fn length(&self) -> usize { self.ck.len() } } diff --git a/src/spartan/ppsnark.rs b/src/spartan/ppsnark.rs index 75afe6e91..0f6aba207 100644 --- a/src/spartan/ppsnark.rs +++ b/src/spartan/ppsnark.rs @@ -847,7 +847,7 @@ impl> RelaxedR1CSSNARKTrait, ) -> Result<(Self::ProverKey, Self::VerifierKey), NovaError> { // check the provided commitment key meets minimal requirements - assert!(ck.len() >= Self::commitment_key_floor()(S)); + assert!(ck.length() >= Self::commitment_key_floor()(S)); let (pk_ee, vk_ee) = EE::setup(ck); // pad the R1CS matrices diff --git a/src/traits/commitment.rs b/src/traits/commitment.rs index 1fd156b3d..a6d7db6c3 100644 --- a/src/traits/commitment.rs +++ b/src/traits/commitment.rs @@ -76,7 +76,7 @@ pub trait CommitmentTrait: /// Note this does not impose any memory representation contraints on the structure. pub trait Len { /// Returns the length of the structure. - fn len(&self) -> usize; + fn length(&self) -> usize; } /// A trait that ties different pieces of the commitment generation together