Skip to content

Commit 66f1678

Browse files
committed
fixed immutable borrow of mutable issue
1 parent c6df44e commit 66f1678

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/whirlpool.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ impl Digest for Whirlpool {
9191
}
9292

9393
carry = x > 0xff;
94-
let length = self.bit_length.len();
95-
self.bit_length[length - i - 1] = (x & 0xff) as u8;
94+
let pos = self.bit_length.len() -i - 1;
95+
self.bit_length[pos] = (x & 0xff) as u8;
9696
}
9797

9898
// process the data itself

0 commit comments

Comments
 (0)