Skip to content

Commit 00374bc

Browse files
authored
Merge pull request #116 from dalek-cryptography/clippy-fixes
Bump nightly, apply some clippy fixes
2 parents 24f3b90 + ecdc13e commit 00374bc

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly-2018-07-08
1+
nightly-2018-07-16

src/inner_product_proof.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@ impl InnerProductProof {
109109
H = H_L;
110110
}
111111

112-
return InnerProductProof {
112+
InnerProductProof {
113113
L_vec: L_vec,
114114
R_vec: R_vec,
115115
a: a[0],
116116
b: b[0],
117-
};
117+
}
118118
}
119119

120120
/// Computes three vectors of verification scalars \\([u\_{i}^{2}]\\), \\([u\_{i}^{-2}]\\) and \\([s\_{i}]\\) for combined multiscalar multiplication

src/range_proof/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ impl<'de> Deserialize<'de> for RangeProof {
341341
where
342342
E: serde::de::Error,
343343
{
344-
RangeProof::from_bytes(v).map_err(|e| serde::de::Error::custom(e))
344+
RangeProof::from_bytes(v).map_err(serde::de::Error::custom)
345345
}
346346
}
347347

src/range_proof/party.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl Party {
3333
.commit(Scalar::from_u64(v), v_blinding);
3434

3535
Ok(PartyAwaitingPosition {
36-
generators: generators,
36+
generators,
3737
n,
3838
v,
3939
v_blinding,
@@ -149,7 +149,7 @@ impl<'a> PartyAwaitingValueChallenge<'a> {
149149
r_poly.0[i] = exp_y * (a_R_i + vc.z) + zz * offset_z * exp_2;
150150
r_poly.1[i] = exp_y * self.s_R[i];
151151

152-
exp_y = exp_y * vc.y; // y^i -> y^(i+1)
152+
exp_y *= vc.y; // y^i -> y^(i+1)
153153
exp_2 = exp_2 + exp_2; // 2^i -> 2^(i+1)
154154
}
155155

0 commit comments

Comments
 (0)