Make use of assignment operators

This commit is contained in:
Jack Grigg 2020-10-30 13:26:36 +00:00
parent 890648df4d
commit bc9ca20d56
3 changed files with 5 additions and 5 deletions

View File

@ -34,8 +34,8 @@ fn prepare_tree(vec: &Vec<NodeData>) -> Tree {
loop {
if peak_pos > vec.len() {
// left child, -2^h
peak_pos = peak_pos - (1 << h);
h = h - 1;
peak_pos -= 1 << h;
h -= 1;
}
if peak_pos <= vec.len() {
@ -62,7 +62,7 @@ fn prepare_tree(vec: &Vec<NodeData>) -> Tree {
while h > 0 {
let left_pos = peak_pos - (1 << h);
let right_pos = peak_pos - 1;
h = h - 1;
h -= 1;
// drafting left child
draft(&mut extra, vec, left_pos, h);

View File

@ -209,7 +209,7 @@ impl Tree {
fn pop(&mut self) {
self.stored.remove(&(self.stored_count - 1));
self.stored_count = self.stored_count - 1;
self.stored_count -= 1;
}
/// Truncate one leaf from the end of the tree.

View File

@ -184,7 +184,7 @@ pub fn batch_verify<'a, R: RngCore>(
s.mul_assign(&z);
s = s.neg();
r = r * z;
r *= z;
c.mul_assign(&z);