Skip to content

Commit

Permalink
ec: simplify loop
Browse files Browse the repository at this point in the history
  • Loading branch information
tmatth committed Apr 5, 2019
1 parent fe9d111 commit a3e0fc4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/ec.rs
Expand Up @@ -349,9 +349,7 @@ impl<S> WriterBase<S> {
// encoder or decoder claims to have used 1 bit.
let nbits = nbits_total << OD_BITRES;
let mut l = 0;
let mut i = OD_BITRES;
while i > 0 {
i -= 1;
for _ in 0..OD_BITRES {
rng = (rng * rng) >> 15;
let b = rng >> 16;
l = (l << 1) | b;
Expand Down

0 comments on commit a3e0fc4

Please sign in to comment.