Skip to content

Commit 39ccc08

Browse files
committed
fixed immutable borrow of mutable issue
1 parent 0616c25 commit 39ccc08

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/whirlpool.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ impl Digest for Whirlpool {
9191
}
9292

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

9798
// process the data itself

0 commit comments

Comments
 (0)