Browse Source

minor nits

main
Srinath Setty 3 years ago
parent
commit
f87f9a0580
2 changed files with 4 additions and 4 deletions
  1. +3
    -3
      src/lib.rs
  2. +1
    -1
      src/pasta.rs

+ 3
- 3
src/lib.rs

@ -205,7 +205,7 @@ mod tests {
let rand_inst_witness_generator =
|gens: &R1CSGens<G>, I: &S| -> (S, R1CSInstance<G>, R1CSWitness<G>) {
let i0 = I.clone();
let i0 = *I;
// compute a satisfying (vars, X) tuple
let (O, vars, X) = {
@ -226,14 +226,14 @@ mod tests {
res.unwrap()
};
let U = {
let comm_W = W.commit(&gens);
let comm_W = W.commit(gens);
let res = R1CSInstance::new(&S, &comm_W, &X);
assert!(res.is_ok());
res.unwrap()
};
// check that generated instance is satisfiable
assert!(S.is_sat(&gens, &U, &W).is_ok());
assert!(S.is_sat(gens, &U, &W).is_ok());
(O, U, W)
};

+ 1
- 1
src/pasta.rs

@ -78,7 +78,7 @@ impl ChallengeTrait for pallas::Scalar {
impl CompressedGroup for <pallas::Point as GroupEncoding>::Repr {
type GroupElement = pallas::Point;
fn decompress(&self) -> Option<<Self as CompressedGroup>::GroupElement> {
Some(Ep::from_bytes(&self).unwrap())
Some(Ep::from_bytes(self).unwrap())
}
fn as_bytes(&self) -> &[u8] {
self

Loading…
Cancel
Save