Skip to content

Commit 31dd26d

Browse files
committed
Cleanup
1 parent 8f20e5c commit 31dd26d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/ring.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ where
456456
pub type G1Affine<S> = <<S as RingSuite>::Pairing as Pairing>::G1Affine;
457457
pub type G2Affine<S> = <<S as RingSuite>::Pairing as Pairing>::G2Affine;
458458

459-
/// Lagrangian form SRS loader.
459+
/// Lagrangian form SRS lookup.
460460
pub trait SrsLookup<S: RingSuite>
461461
where
462462
BaseField<S>: ark_ff::PrimeField,
@@ -501,10 +501,10 @@ where
501501
/// Construct an empty ring verifier key builder.
502502
pub fn new(ctx: &RingContext<S>, lookup: impl SrsLookup<S>) -> Self {
503503
use ring_proof::pcs::PcsParams;
504-
let srs_loader = |range: Range<usize>| lookup.lookup(range).ok_or(());
504+
let lookup = |range: Range<usize>| lookup.lookup(range).ok_or(());
505505
let raw_vk = ctx.pcs_params.raw_vk();
506506
let partial =
507-
PartialRingCommitment::<S>::empty(&ctx.piop_params, srs_loader, raw_vk.g1.into_group());
507+
PartialRingCommitment::<S>::empty(&ctx.piop_params, lookup, raw_vk.g1.into_group());
508508
RingVerifierKeyBuilder { partial, raw_vk }
509509
}
510510

@@ -521,7 +521,7 @@ where
521521
///
522522
/// If the available free slots are not sufficient to append `pks` sequence, the
523523
/// number of available slots are returned in the error variant.
524-
/// If the supplied loader returns `None`, then an error with `usize::MAX` is
524+
/// If the supplied `lookup` returns `None`, then an error with `usize::MAX` is
525525
/// returned.
526526
pub fn append(
527527
&mut self,
@@ -734,9 +734,8 @@ pub(crate) mod testing {
734734
assert_eq!(vk_builder.free_slots(), pks.len());
735735

736736
let extra_pk = random_val::<AffinePoint<S>>(Some(rng));
737-
let faulty_loader = |_| None;
738737
assert_eq!(
739-
vk_builder.append(&[extra_pk], faulty_loader).unwrap_err(),
738+
vk_builder.append(&[extra_pk], |_| None).unwrap_err(),
740739
usize::MAX
741740
);
742741

0 commit comments

Comments
 (0)